Bottom margin or spacing in an inline img

Inline img tags by default is positioned such that it has an additional bottom spacing relative to its parent block element. If the parent block element e.g. div have zero padding and the img have zero margin, the img height will not equal to the div height as the additional spacing will push the parent […]

:hover not allowed in IE other than on anchors

The CSS :hover event is only supported for the anchor element <a> and hence to simulate the correct :hover behavior for other elements such as td:hover, we need a javascript hack. The idea is to change the class of the hoverable element so that the CSS can be applied to the class i.e. td.hoverable. To […]

centering divs with css

In designing layouts with CSS for web pages, centering divs is a very common problem that I cme across almost all the time. And the reason for this is that IE7 does not confirm to the width attribute standards.