...

View Full Version : Background Image (y-repeat & height) in Content Area NOT COOPORATING WITH DIV



_yo_wasup_
02-14-2011, 04:47 PM
<url removed, see excellent help below for simple solution>

It seems that at line 23 in my code, I have to DEFINE the height in order for my background to stick to the contents. There is a content div that holds both the left and right divs. I can't figure out how to get this background to stick to whatever size the contents are. Any help is very appreciated on this Valentines day. PLEASE HAVE A HEART AND HELP ME!

Excavator
02-14-2011, 05:15 PM
Hello _yo_wasup_,
Since the contents of #content are floated they need cleared. Try clearing them like this -
#content {
width:717px;
overflow: auto;
background-image:url(images/content_bg.png);
}


See how overflow: auto; works to clear your floats (http://www.quirksmode.org/css/clearing.html).

_yo_wasup_
02-14-2011, 05:21 PM
Hello _yo_wasup_,
Since the contents of #content are floated they need cleared. Try clearing them like this -
#content {
width:717px;
overflow: auto;
background-image:url(images/content_bg.png);
}


See how overflow: auto; works to clear your floats (http://www.quirksmode.org/css/clearing.html).

EXCELLENT, thank you very much! I had tried doing clear:both;, but had not tried overflow:auto;. Thank you for the nice Valentines day gift-- your exceptional support!

Excavator
02-14-2011, 05:25 PM
EXCELLENT, thank you very much! I had tried doing clear:both;, but had not tried overflow:auto;. Thank you for the nice Valentines day gift-- your exceptional support!

clear: both; would only work if you had a third element inside #container, after the floated columns that was not floated. Like a footer or something. Applying clear: both; to #content itself would not affect it's contents.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum