Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: I need help

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

    Question I need help

    I don't know If what I want is java or html but I need help. i would like to put a picture on the background of a page and have the text scroll over it. I don't know how to do this beacuse I am kinda new to the whole scripting thing. If you could help it would be greatly appreciated. JF

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

    Default

    I think what you mean is something like
    <style type="text/css">
    body { background-attachment: fixed; }
    </style>

    Add it to the head.
    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
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So how do I tell it what picture I want as the background? Is it a href after the background attachment?

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

    Default

    by the way I am new to this whole scripting thing and I am the webmaster at my school. So I get to learn how to do it and do it all at the same time. So any other suggestions that you might have would be greatly appreciated. JF

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

    Default

    Sorry:
    <style type="text/css">
    body {
    background-image: url('images/image.png');
    background-attachment: fixed;
    }
    </style>
    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!

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

    Default

    Is there a way that is less code in html?

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

    Default

    Less code? It's only six lines.
    That is the advisable, standards-compliant way to do it. There are others, but they are now deprecated/obsolete and one of them (bgproperties="fixed") was IE-only in the first place.
    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!

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

    Default

    <style type="text/css">
    @media visual{
    body{
    background-image: ('/pics/pic1.jpg');
    background-attachment: fixed;
    }
    }

    all.clsMenuItemNS{font: bold x-small Verdana; color: white; text-decoration: none;}
    .clsMenuItemIE{text-decoration: none; font: bold xx-small Verdana; color: white; cursor: hand;}
    A:hover {color: red;}
    </style>

    Here is where I put it. Does it matter that there is another thing in the style before it closes or did I enter it wrong or am I just a retard?

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

    Default

    Nope, that's fine.
    After Mike's had a look at it:
    Code:
    <style type="text/css">
    @media screen, projection {
      background: #ffffff url(/path/to/image) fixed;
    }
    </style>
    I'm not sure if he deliberately missed the body declaration out or if it's a form of shorthand unbeknownst to me; if that doesn't work, use:
    Code:
    <style type="text/css">
    @media screen, projection {
      body {
        background: #ffffff url(/path/to/image) fixed;
      }
    }
    </style>
    Last edited by Twey; 08-31-2005 at 03:41 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!

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

    Angry

    <style type="text/css">
    @media, projection {
    body {
    background: #ffffff url (pics/pic1.jpg) fixed;
    }
    }

    all.clsMenuItemNS{font: bold x-small Verdana; color: white; text-decoration: none;}
    .clsMenuItemIE{text-decoration: none; font: bold xx-small Verdana; color: white; cursor: hand;}
    A:hover {color: red;}
    </style>

    It still didn't work. And does it apply the background picture to only this page?

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
  •