I'm having a problem with positioning in IE. Problem doesn't exist in firefox. I have 3 divs - banner, nav, and "below banner" below banner contains a few more divs (sidemenu, content, and some blocks), but the idea is that my "below banner" div will be like a frame bordering on the top part of the screen, and the banner and nav divs make up the top part. I set the positioning as follows: banner: top: 0; height: 100px; nav: top: 100px; height: 25px; belowbanner: top 125px; In IE, the belowbanner sits 1 pixel up from where it should - overlapping the nav div. In firefox it looks fine. When I add: border: 1px dotted #FFF; to the belowbanner, the border shows, and the div is positioned properly. margins and padding are set to 0 for all these divs. Any ideas?
fixed my own problem here... Set the following property on my nav div: overflow: hidden; Seems that the size of my text in the nav div was increasing the size of the nav div. Apparently, IE and firefox have different ways of dealing with that issue.
Most likely you are missing line-height in your CSS. If line-height is greater than height, the content is supposed to be visible outside the element. IE and Opera screw up while dealing with height, line-height and overflow and produce incorrect results in most combinations. Try this in IE, Opera and FF: <html> <head> <style type="text/css"> div {background-color: yellow; border: 1px solid red; margin-top: 20px; font-size: 12pt; padding: 0px;} </style> </head> <body> <div style="line-height: 10px; height: 5px; overflow: hidden;">line-height: 10px; height: 5px; overflow: hidden;</div> <div style="line-height: 10px; height: 30px; overflow: hidden;">line-height: 10px; height: 5px; overflow: hidden;</div> <div style="line-height: 10px; height: 5px; overflow: visible;">line-height: 10px; height: 5px; overflow: visible;</div> <div style="line-height: 10px; height: 30px; overflow: visible;">line-height: 10px; height: 5px; overflow: visible;</div> </body> </html> Code (markup): You might be able to fix your HTML by tweaking line-height. You can also try using tables - all three are closer to each other in how they implement tables. J.D.