Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Full width banner

7:36 pm on Oct 24, 2011 (gmt 0)

New User

joined:Oct 24, 2011
votes: 0

I am having an issue and it's driving me nuts. I want a banner to span the top of the browser window, regardless of how wide the browser is. I have a b_left.png (282x92px) that I want in the upper left and b_right.png (247x92px) that I want on the opposite end. I have a b_filler.png (1x92px) that I want to use as a background image for the middle filler piece. This is what I have so far:

<div style='height: 92px; width: 100%;'>
<div style='height: 92px; width: 282px; float: left;'>
<img style='width: 282px; height: 92px;' src='b_left.png'>
<div style='height: 92px; float: left; background-image: url(b_filler.png);'>
<div style='height: 92px; width: 247px; float: right;'>
<img style='width: 247px; height: 92px;' src='b_right.png'>

The left and right imgs go where they need, but no background fills the center. If I remove float: left, the background fills but then the right image drops down below the height of the left/middle, augh!

What am I doing wrong? :)
7:43 pm on Oct 24, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 12, 2006
votes: 45

try scrapping the middle div, and putting the b_filler as a background image on the outermost container -- so it stretches 100% across the top. then your other two images can just sit over the top of it.
8:02 pm on Oct 24, 2011 (gmt 0)

New User

joined:Oct 24, 2011
votes: 0

Ahh thanks! Duh, never thought of that (smack forehead). Works great now, thanks again :)

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members