...

View Full Version : The Wrapper Will Not Expand Its Color



inVINCEable
06-03-2007, 01:41 AM
I have a background picture set to repeat like this in my css file:

body {
background-image:url(body_bg.gif) ;
background-repeat:repeat-x;
background-color:#d4e1f0;
}

^This works fine. the body_bg.gif is only around 500px in height, so I simply added the background color and it expanded down to the bottom of the page which is just what I wanted.

Now, when I try to do this with my #wrapper, it creates a problem.

#wrapper {
width:1000px;
margin:auto;
background:url(page_bg.gif);
background-repeat:no-repeat;
}

The page_bg.gif also ends around 500px so I also tried using the background, background-color etc to get it to expand, but it seems as no matter what I do nothing changes.

Any advice?

Thank you.

_Aerospace_Eng_
06-03-2007, 01:42 AM
I'm guessing you are floating some elements causing the wrapper not to expand. We need to see the rest of your code.

inVINCEable
06-03-2007, 01:51 AM
Attached is my CSS file.


Also something that has never happened before, my text if it is too long for the line, is just going on as long as it needs to.

_Aerospace_Eng_
06-03-2007, 01:53 AM
We need to see your html as well. Like I said you are probably floating some elements and forgot to clear them.
http://www.positioniseverything.net/easyclearing.html <-read that

inVINCEable
06-03-2007, 02:13 AM
Ah Sorry. Here is my html


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link type="text/css" rel="stylesheet" href="master.css"/>
</head>
<body>
<div id="wrapper">



<div id="heading">
here is my heading
</div>

<div id="advert">

Advertisement
</div>

<div id="side">
here is the side
</div>

<div id="content">
Here is where my content goes.

dsgfdsgdfs
</div>

<div id="footer">
Here is a footer
</div>

</div>
</body>
</html>

inVINCEable
06-03-2007, 02:17 AM
_Aerospace_Eng_ thank you very much!


I just went ahead and set the content to

clear:both


viola! Problem solved!

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum