Forum Moderators: not2easy

Message Too Old, No Replies

padding added to width in firefox?

         

Smad

3:07 pm on Jul 14, 2004 (gmt 0)

10+ Year Member



I was under the impression that if u have padding then its included in the width not added to it? my navigation works fine in IE 6 but in firefox its wider than it should be, infact mozilla is wider too?

heres the code

#nav ul li a {
display: block;
width:114px;
padding: 2px 2px 2px 10px;
border: 1px solid #000000;
background: #dcdcdc;
text-decoration: none;

}

thanks

DrDoc

3:17 pm on Jul 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's actually the other way around...

See this previous thread:
[webmasterworld.com...] (msg 37 & 38)

And W3C's excellent explanation:
[w3.org...]

Also, to ensure that IE6 will render the page correctly -- use a full and valid doctype [w3.org]. [msdn.microsoft.com...]

For IE5.x/Win you will still need to resort to the Box Model Hack or Conditional Comments [msdn.microsoft.com].