Quick Hack to Solve Strange IE7 Display Behavior

Tuesday, January 5, 2010 , Posted by Johnny Fuery at 4:19 PM

Originally Published 2007-10-11 19:22:57

Further to my article earlier today on the topic of checking your page design in multiple browsers, I've noticed quite a few strange behaviors that effect only IE7, especially related to the placement of div blocks. It seems that the the display parameter in CSS (e.g., {display: block; display: inline;}, etc.) doesn't match either IE6 or Firefox.

There's a quick solution to this problem, however. In my case, I had a section of text that was positioned about 60 pixels higher in IE7 than in the other two browsers. So I just added the following to my source file:

<!--[if gt IE 6]>
#message_left {
padding-top: 60px;

#message_right {
padding-top: 80px;


Thanks to quirksmode.org, where I found this helpful workaround.

Currently have 0 comments:

Leave a Reply

Post a Comment