3 pixel offset in ie

July 13, 2005

I setup a pretty standard css/xhtml 2-column website with a left floating sidebar for the navigation menu and a main div to the right with all the text. I noticed in IE, when the main div got longer than the sidebar, it would slide back to the left a couple of pixels. Hardly noticeable, but just enough to drive you crazy. I must of spent an hour or two trying to work around it until I came across IE Three Pixel Gap.

The hack to make IE render the page properly is to use this css on the main section:
* html p {
height: 1%;
margin-left: 0;
}

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: