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.
<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 {
  background-image: url('/path/to/image');
  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
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.