Div Image Snippets


Sometimes it's desirable to change a style of the first and/or last elements in a container. You can do this by manually applying classes to your HTML elements: ("last-child" still not supported in IE8).

01 April, 2011   

This sticky footer solution is working in all major browsers, including Google Chrome! It works with floated 2-column layouts and we don't get overlap in re-sized browser windows unlike older solutions you find when you Google sticky footer. And you don't need an empty push div.

21 February, 2011   

Centering a Website

16 February, 2011   

HTML5 Article Structure with hNews

HTML5 code for Article Structure with hNews

09 January, 2013   

Better way to handle Broken Image. Missing images will either just display nothing, or display a [ ? ] style box.

This technical tip shows how to read the image and mark all the barcode regions, for all the recognized barcodes in the image. The barcode region is the part of the image that only contains the barcode itself. In a large image, it is possible that there are other texts or images along with the barcode. Getting the barcode region will separate...

Display an image anywhere on the screen, without using UI Builder. You can use this for other types of views as well.

The example below shows how to produce a png image from python code, but pygments supports lexers for many other languages and its formatter classes can produce other image formats too. The ImageFormatter class allows to set various parameters of the resulting images.

13 August, 2011   

If you're looking for a way to spice up your web site, this JavaScript tip may be just what you're looking for. You can use JavaScript to highlight an image when you place your mouse over it. This JavaScript tip provides a great way to highlight your navigational buttons or whatever you'd like.

PHP code to display a thumbnail image on the page without saving it

28 November, 2011   

An HTML scroll box is a box that grows scroll bars when it's contents are too large to fit in the box.

03 June, 2013   

Matlab example code for DoubleFlip Image

Example shown here CSS + Inline Image Technique

Absolute Center (Vertical & Horizontal) an Image

01 February, 2011   

Missing images will either just display nothing, or display a [ ? ] style box when their source cannot be found. Instead you may want to replace that with a "missing image" graphic that you are sure exists so there is better visual feedback that something is wrong. Or, you might want to hide it entirely. This is possible, because...

JavaScript Code example to highlight an Image on Mouseover

28 December, 2011   

Delphi Code Example for Print Screen using Quick Reports

17 February, 2019   

Missing images will either just display nothing, or display a [ ? ] style box when their source cannot be found. Instead, you may want to replace that with a "missing image" graphic that you are sure exists so there is better visual feedback that something is wrong. Or, you might want to hide it entirely. This is possible because...

28 September, 2015   

CSS code example for Horizontal-Vertical div align