Skip to content
February 5, 2011 / pauldundon

IE7 Layouts Out by a One Pixel

The Problem: You are designing a web page and need pixel-precision accuracy. The layout works fine in IE8 but some elements are offset vertically by one pixel (or a few pixels) in IE7.

Possible Cause: IE8 renders empty tables with zero height, but IE7 renders them with 1px height. The table therefore introduces a 1px vertical space into the layout.

Solution: Use CSS to set the height of the table to 0px, or display:none, in the event that it is empty.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: