PDA

View Full Version : Problem with div height in IE


magicpaul
08-08-2006, 11:26 AM
I'm currently having a little problem with my navigation boxes in IE. They have a rounded graphic for the bottom which I have set as the background of a DIV. Works fine in Firefox but IE doesn't seem to like the height attribute.

Here's an example of what I mean:

http://www.paulyounghusband.co.uk/problem/problem.html

Any help would be appreciated!

_Aerospace_Eng_
08-08-2006, 04:22 PM
IE accounts for font-size and line-height. You also need to use units on all of your widths, heights, borders, padding, and margins unless the its a 0 value. The validator complains when line-height has no unit even when its 0.
.NavBottom {
background: url(navbottom.gif);
margin: 0;
padding: 0;
border: 0;
width: 163px;
height: 10px;
font-size:0;
line-height:0px;
}

magicpaul
08-08-2006, 04:24 PM
Brilliant, thanks for your help! :thumbsup: