Removing spaces below images in FF & Safari

Here’s an annoying problem. A site renders perfectly in IE6 (this alone is surprising) but in Firefox2 and Safari it shows a 4px space below each image:
Images naturally sit on the baseline. This means that they’re about 4px up from the bottom normally. Setting vertical-align: bottom or display:block seems to clear it.
The solution for [...]

Filed under: Firefox, Safari, css, html

Centering absolutely positioned elements

Having problems setting auto margins on an absolutely positioned element? Me too… until I found that I was missing one simple bit of css.
When centering an absolutely positioned element horizontally you have to specify the left and right properties as zero for this to work!
I found the solution here but I thought I’d note it [...]

Filed under: css, html, , , ,