Log in

View Full Version : Can you help?



Freeman
08-31-2005, 01:41 PM
I have a question. I want to have a picture in the background and have everything else scroll over it. Is there a way to do this in html or do I have to use java? Any tips would help me.

Twey
08-31-2005, 02:01 PM
<head>
<style type="text/css">
@media screen {
body {
background-image: url('/path/to/image');
background-attachment: fixed;
}
}
</style>

mwinter
08-31-2005, 02:29 PM
@media visual {There's no 'visual' media type. Did you mean screen?


body {
&#160;&#160;background-image: url('/path/to/image');
&#160;&#160;background-attachment: fixed;
}You should also include a background colour, and may as well collapse these into a single shorthand declaration:


@media screen, projection {
body {
background: #ffffff url(/path/to/image) fixed;
}
}Mike

Twey
08-31-2005, 03:42 PM
There's no 'visual' media type. Did you mean screen?
Oops, yes I did. Typo, sorry.

background: #ffffff url(/path/to/image) fixed;
Did you intend to miss out the body declaration? Is this a form of shorthand I know nothing about?

mwinter
08-31-2005, 08:18 PM
Did you intend to miss out the body declaration?No. :( Post corrected.