Frozen background

liunx

Guest
How can I create frozen backgroun?<!--content-->Welcome to the forums.<br />
<br />
Define "frozen background"&hellip;<!--content-->If you're referring to having your background an image and having it appear as if it's stationary while scrolling... then use this code:<br />
<br />
<body background ="yourimage.gif" bgproperties="fixed"><!--content-->Originally posted by Stopper31 <br />
<body background ="yourimage.gif" bgproperties="fixed"> <!-- m --><a class="postlink" href="http://forums.webdeveloper.com/showthread.php?s=&threadid=28783#post153308">http://forums.webdeveloper.com/showthre ... post153308</a><!-- m --><!--content-->I stand corrected... thanks fredmv!<!--content-->Don't you mean<body style="background url(yourimage.ext) fixed no-repeat;">?<!--content-->Originally posted by Stopper31<br />
I stand corrected... thanks fredmv! No problem. ;)Originally posted by omega<br />
Don't you mean&hellip;If you don't want the background to repeat, sure. You also have one slight syntax error (carefully note the addition of the colon):background: url(yourimage.ext) fixed no-repeat;Moreover, I'm sure it was just for the convenience of an example, but inline-styles should be avoidied.<!--content-->Yes, it was, and you could just exclude the 'no-repeat' if you wanted it too repeat, but I find those bgs hideous. Yes for got the : big deal :rolleyes: ... as for nline styles, I'd like to hear your reasoning against them.<!--content-->Originally posted by omega <br />
Yes for got the : big dealIt is a big deal considering it wouldn't work correctly without it. ;)Originally posted by omega <br />
as for nline styles, I'd like to hear your reasoning against them. It's not that I have anything against them, it's more like code management and ease of updates is more efficent with external CSS or in some cases, embedded CSS. It's just a good practice. Though, I suppose in some very rare instances (e.g., when you have a static page in which only uses a style once), inline-styles might be acceptable.<!--content-->You know what I mean, it's a syntax mistake, because I was typing too fast, big deal. Same with me saying 'nline' styles, instead of inline. <br />
<br />
As for inline styles I think, in my case at least, is when a style is applied to multiple (every) page, and the object being styled is used once.<!--content-->
 
Back
Top