Friday, May 30, 2008

Firefox, Images and Myterious Gaps

Scenario:

  • You are using tables

  • You are using firefox

  • You are using <img> element to inside table

  • And firefox is setting extra white space below the image in table cell


Example:


This happens when you have Strict doc type declaration.

Quick Fix:
Apply style to that image. display: block
Ex: td img {
display: block;
}
or
.image {
display: block;
}

Reference: mozilla developer center

No comments:

Post a Comment