Jump to content

Background image question


sam_h

Recommended Posts

Hi,

 

I have a simple header and two column layout all surrounded by a #outer. one colomn is #page and one is #right

 

I want to be able to set the background-image of #outer so that it is also the background for #page and #right but for some reason it stops being the background as soon as it gets to the top of those divs. if that makes any sense?!

 

is there a way to get around this?

 

here is my code:

 

body {
background-color:#f3f3f3;
font-family:Arial, Helvetica, Geneva, sans-serif;
font-size:0.88em;
line-height:1.5em;
color:#444;
}


#outer {
width:970px;
text-align:center;
margin:0 auto 50px;
padding:0;
background-image:url(/Images/body_bg.jpg);
background-position:top;
background-repeat:repeat-y;
}


#page {

width:640px;
text-align:left;
padding: 10px 0 10px 10px;
float:left;
}

#right {

float:right;
text-align:left;
width: 300px;
padding:10px 10px 0 0;

}

 

html:

 

<body>
<div id="outer">

<a href="/index.html"><img src="/Images/header_test_new6.png" border="0" alt="OnYaHead.com Logo"/></a>

<div id="right">
content here
</div>

<div id="page">
more content here
</div>
</div>

</body>

Link to comment
Share on other sites

Adding the CSS I mentioned means he won't need to add a height to outer - it will expand to wrap around the contents inside. If he adds a height, it won't expand, it will just add scrollbars when it gets higher than the allowed height.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.