Click to See Complete Forum and Search --> : horizontal div won't expand on ie 6


riskmod
07-10-2008, 08:35 AM
Is there a fix for this:


#banner {
background-color: #000000;
background: #000 url (images/spacer.gif) repeat-x;
text-align: left;
position: absolute;
right: 0;
left: 0;
height: 34px;
padding: 0px;
margin: 0px;
}



It expands no matter how big you make your bowser (horizontally) fine on FF3/2 and IE7 but not IE 6....any ideas?

TY

Centauri
07-10-2008, 08:53 AM
Try width: 100%;

riskmod
07-10-2008, 09:16 AM
Thanks but ie 6 still doesn't flinch.


.....that makes ie 7 and ff work better though

Here what I have in the html:


<div id="banner">
<img src="images/header.gif" width="771" height="34" alt="" /><br />
</div>

ray326
07-10-2008, 01:35 PM
Could be a position:absolute problem I guess.

riskmod
07-10-2008, 03:11 PM
yeah I just need some sort of solution on it

Centauri
07-10-2008, 05:44 PM
When absolutely positioning it is best to specify both an x and y coordinate so browsers don't have to guess. IE6 won't respond to stretching by specifying both left and right positions, so along with the 100% width, specify the left and top positions and remove the right. I question whether the absolute positioning is necessary anyway - using the default static position the div will expand to full available width naturally.

riskmod
07-11-2008, 08:08 AM
thanks Cent