View Full Version : can i make the background image stay put?


johnnydeppqueen
01-04-2004, 07:24 PM
http://www.freewebs.com/test_4_webs/haha.htm i made 2 blogs, the top 1 scrolls currently and i want the background image to stay in one spot, does anyone know how to do this?

COBOLdinosaur
01-04-2004, 07:32 PM
In the head of the page:

<style="text/css">
body { background-repeat:no-repeat;background-attachment:fixed;
background-position:left top;background-image:url(blah.jpg) }
</style>

jamslam
01-04-2004, 07:34 PM
Try getting rid of the bgproperties you have in your style tag, and replacing it with this:

background-attachment: fixed;

Also, you might want to try opening your HTML document, as it *could* be the cause of some problems.

johnnydeppqueen
01-04-2004, 07:36 PM
that code doesn't work, check out my page again...:(
http://www.freewebs.com/test_4_webs/haha.htm

jamslam
01-04-2004, 07:39 PM
that code doesn't work, check out my page again...:(
http://www.freewebs.com/test_4_webs/haha.htm

it doesn't work because you haven't properly opened your document.

Also, that still wouldn't work because it's being applied to the body of your page, instead of that division that scrolls.

So like I said, in the division that you don't want it to scroll, remove the bgproperties from the style attribute, and replace it with this:

background-attachment: fixed;

johnnydeppqueen
01-04-2004, 07:40 PM
OK! I got it!! I didn't understand what you meant at first, then it clicked!!

johnnydeppqueen
01-04-2004, 07:42 PM
And by the way, thanks a lot for your help!!!!:)

jamslam
01-04-2004, 07:45 PM
*Edit*

alright no problem :)