Forum Moderators: not2easy

Message Too Old, No Replies

div width 100% in IE5x and IE6

how to get a div to span the full width in all browsers

         

fwordboy

9:25 am on Oct 27, 2003 (gmt 0)

10+ Year Member



I've got a layer that i want to spand across the whole width of the page. it does in IE6, Mozilla, Opera etc. but in IE5.5 and less it doesn't go all the way across.

the code

#nav{
background-color: #006699;
color: #FFFFFF;
padding: 1px 1% 1px 0%;
width: 99%;
border-top-width: 1px;
border-bottom-width: 1px;
border-top-style: ridge;
border-bottom-style: ridge;
border-top-color: #000000;
border-bottom-color: #000000;
float: left;
z-index: 1;
}

is there a way I can hide another specifcation for the width to be 100% from IE6/Moz?

Nick_W

9:30 am on Oct 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to CSS Forum [webmasterworld.com] and WebmasterWorld!

Sounds like you may be running into IE's incorrect rendering of the box model. Try it without the padding and borders to see.

You may need to use the famous 'box model hack' - A google search should bring up the right page ;)

Nick

fwordboy

11:19 am on Oct 27, 2003 (gmt 0)

10+ Year Member



thanks i've put this into my code. I've no way of testing it as I have IE6 on my laptop but I trust this'll work.
for reference sake i got the answer from herthe first result on the search term box model hack on google.com