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.
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.
Code:<head> <style type="text/css"> @media screen { body { background-image: url('/path/to/image'); background-attachment: fixed; } } </style>
Last edited by Twey; 08-31-2005 at 03:44 PM.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
There's no 'visual' media type. Did you mean screen?Originally Posted by Twey
You should also include a background colour, and may as well collapse these into a single shorthand declaration:body {
  background-image: url('/path/to/image');
  background-attachment: fixed;
}
MikeCode:@media screen, projection { body { background: #ffffff url(/path/to/image) fixed; } }
Last edited by mwinter; 08-31-2005 at 08:20 PM. Reason: Correction
Oops, yes I did. Typo, sorry.Originally Posted by Mike
Did you intend to miss out the body declaration? Is this a form of shorthand I know nothing about?background: #ffffff url(/path/to/image) fixed;
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
No.Originally Posted by Twey
Post corrected.
Bookmarks