View Full Version : no repeat background
rosends
04-08-2003, 12:09 AM
I have a background and I want it so stay fixed, non-scolling, while the text scrolls over it. I have the following code:
<STYLE type=text/css>BODY {
BACKGROUND: url(/images/cookies_fixed.png) #ffffff fixed no-repeat center 50%
}
</STYLE>
But I realize that I made my pages initially through MSWord and word inserts all sorts of other code in there. So I don't know where to put the fixed command.
My background stuff looks like:
<body bgcolor=white background="leftframeback.gif" lang=EN-US
link=blue vlink=blue style='tab-interval:.5in'>
<!--[if gte mso 9]><xml>
<v:background id="_x0000_s1025" o:bwmode="white" o:targetscreensize="800,600">
<v:fill src="leftframeback.gif" o:title="leftframegreyback"
type="frame"/>
</v:background></xml><![endif]-->
If you want to see it in action, go to www.mydiningroom.com and go to any page which appears in the right frame.
Thanks
Dan
Nightfire
04-08-2003, 12:20 AM
I use
<style>
body{
background-color:#ffffff;
background-image:url("/images/cookies_fixed.png");
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
}
</style>
rosends
04-08-2003, 12:57 PM
But how can I take even that code and make it work with the stuff that msword has inserted (as a novice coder, I'm loath to start deleting chuncks of msword's code and replacing, as I don't know the effect on the page).
Thanks
oracleguy
04-08-2003, 04:33 PM
Try putting the CSS code in between the head tags then removing the background attribute from the body tag.
rosends
04-08-2003, 05:37 PM
thanks -- I think I have an idea now. But the exact syntax of the inclusion leads me to a couple of quick questions:
(/images/cookies_fixed.png) #ffffff fixed no-repeat center 50%
would my url be in parentheses?
what is the significance of the hex color ffffff, and
would I type out "no-repeat center 50%"? (what are my options?
thanks again
dan
eggman
04-08-2003, 06:25 PM
body{
background:#ffffff url("/images/cookies_fixed.png") no-repeat fixed 50% 50%;
}
I think that's in the right order. The #ffffff is the color white for the background color of the document.
rosends
04-08-2003, 08:10 PM
I created this:
<body {
background: #ffffff url("leftframeback.gif") no-repeat fixed 50% 50%;
}
lang=EN-US
link=blue vlink=purple style='tab-interval:.5in'>
<!--[if gte mso 9]><xml>
<v:background id="_x0000_s1025" o:bwmode="white" o:targetscreensize="800,600">
<v:fill src="" o:title="leftframegreyback" type="frame"/>
</v:background></xml><![endif]-->
but the background stays white. I took the ffffff out, hoping that no color would not overwhelm the background, and it was still white. I even tried typing in the entire ---> url("http://www.mydiningroom.com/leftframeback.gif") and still, nothing.
Nightfire
04-08-2003, 08:18 PM
You can't do it like that. You have to put it in <style></style> tags in the header, not directly into the body tag like that. Can I also suggest you don't use MS word anymore? It's adding useless code to the page.
rosends
04-08-2003, 08:28 PM
brillinat! I just changed it to "repeat" and put it in the style part (and eliminated the rest of the msjunk) and I got:
www.mydiningroom.com/oldshows2.html
Thanks
[and I know not to use ms, but I do this during lulls at work and new pages start simpler with ms...then I screw with them and remake them in notepad]
Dan
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.