Marty Martin wrote:

>I have a graphic (inside a div) that is 100px high and is positioned
>absolute at left:0; top:0;.  I am wanting to put a div beside the div
>with graphic with a background color to stretch to the far right of
>the screen so it appears to be one long banner no matter the size of
>the browser for the user.
>
>Here's what I have but it isn't working--
>
>       div#header {
>               position: absolute;
>               top: 0;
>               left: 0;
>               z-index: 0;
>       }
>
><div id="header">
>       <div style="float: left;"><img src="images/headers/winter_header.gif"
>width="560" height="150" /></div>
>       <div style="background-color: #009ACF; height: 101px; width:
>100%;">&nbsp;</div>
></div>
>
>How can I get that second div to stretch all the way across the screen?
>
>  
>

Marty,

I know you said you figured it out, but I wanted to suggest this 
alternate markup because of its greater simplicity:

<div id="header">
<img src="images/headers/winter_header.gif" width="560" height="150" /></div>

With this CSS:

#header {
float: left; /* Just to contain the floated image. You can replace with 
your preferred float containment method if you like. */
height: 150px;
background-color: #009ACF;
}
#header img {
float: left;
width: 560px;
}

This should produce the same thing but is much simpler markup and CSS.

Zoe

-- 
Zoe M. Gillenwater
Design Services Manager
UNC Highway Safety Research Center
http://www.hsrc.unc.edu

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to