Results 1 to 5 of 5

Thread: Can you help?

  1. #1
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Can you help?

    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.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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!

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    @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:

    Code:
    @media screen, projection {
      body {
        background: #ffffff url(/path/to/image) fixed;
      }
    }
    Mike
    Last edited by mwinter; 08-31-2005 at 08:20 PM. Reason: Correction

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Quote Originally Posted by 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?
    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!

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Twey
    Did you intend to miss out the body declaration?
    No. Post corrected.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •