Background help

admin

Administrator
Staff member
Hi, just had a quick html question. How do i get the back ground to stay the same and for everything to move on top of it? Im just starting to learn html and cant find any tutorials on the web on how to do this. Any help is appriciated.<br />
<br />
So far, all i have is this:<br />
<br />
<body background = "/image/bob.jpg"><!--content-->If bob.jpg is in the /image/ folder, that code should work, although you don't need spaces after the equals sign (=).<br />
<br />
<br />
<body background="image/bob.jpg"><br />
<br />
<br />
Jona<!--content--><body background="http://www.address/bluebg.gif" bgproperties=fixed><!--content-->Originally posted by R/CAreUs<br />
<body background="http://www.address/bluebg.gif"bgproperties=fixed><br />
<br />
First of all you need a space after the quote before the bgproperties attribute. Second, bgproperties is not valid HTML 4.01 Transitional and it will only work in Internet Explorer. If you would like this effect, however, you could try to use the background-attachment (<!-- m --><a class="postlink" href="http://www.w3.org/TR/CSS2/colors.html#propdef-background-attachment">http://www.w3.org/TR/CSS2/colors.html#p ... attachment</a><!-- m -->) property of CSS:<br />
<br />
<br />
<style type="text/css"><br />
<!--<br />
body {background-image: url(/image/bob.jpg);<br />
&nbsp; &nbsp; &nbsp; background-attachment: fixed;}<br />
--><br />
</style><!--content--><style type="text/css"> <br />
<!-- <br />
body {background-image: url(/image/bob.jpg); <br />
background-attachment: fixed;} <br />
--> <br />
</style> <br />
<br />
Are you saying that the above is valid HTML 4.01 ?<!--content-->I'm saying that if you use the W3C HTML 4.01 Validator (<!-- m --><a class="postlink" href="http://validator.w3.org/">http://validator.w3.org/</a><!-- m -->) with that code, you will see that it is considered invalid HTML.. Even in a Transitional Doctype.<br />
<br />
Jona<!--content-->Thank you. Will try this code and see if it works. Looked at the link and not sure if that what i am after. What i am trying to do is have one image in the background, a picture, that is not tiled and does not move. It just fills the screen up and fits on the screen, and all the text and other parts of the site scroll on top of the picture. Ive seen it on a few sites and it looks cool.<!--content-->The Background (<!-- m --><a class="postlink" href="http://www.w3.org/TR/CSS2/colors.html#q2">http://www.w3.org/TR/CSS2/colors.html#q2</a><!-- m -->)<br />
<br />
Jona<!--content-->The background-attachment: fixed in css should do it. The back ground will stay when you scroll up or down. Only the foreground text or image will scroll.<!--content-->Woot! Thank you so much for the help =) It worked ad is exactly what i was looking for! Again, thank you so much for the help. :D<!--content-->
 
Back
Top