sam_h Posted October 8, 2008 Share Posted October 8, 2008 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> Quote Link to comment https://forums.phpfreaks.com/topic/127622-background-image-question/ Share on other sites More sharing options...
dropfaith Posted October 8, 2008 Share Posted October 8, 2008 can you give me a link? Quote Link to comment https://forums.phpfreaks.com/topic/127622-background-image-question/#findComment-660354 Share on other sites More sharing options...
haku Posted October 9, 2008 Share Posted October 9, 2008 Add: overflow:auto; to #outer Quote Link to comment https://forums.phpfreaks.com/topic/127622-background-image-question/#findComment-660493 Share on other sites More sharing options...
dropfaith Posted October 9, 2008 Share Posted October 9, 2008 to add to that answer ad a hieght to outer Quote Link to comment https://forums.phpfreaks.com/topic/127622-background-image-question/#findComment-660502 Share on other sites More sharing options...
haku Posted October 9, 2008 Share Posted October 9, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/127622-background-image-question/#findComment-660520 Share on other sites More sharing options...
sam_h Posted October 9, 2008 Author Share Posted October 9, 2008 thank you haku, that worked a treat!! Quote Link to comment https://forums.phpfreaks.com/topic/127622-background-image-question/#findComment-661027 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.