Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Please help

  1. #1
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Please help

    I'm looking for javascript that when I you scroll the bar, everything will move, but the background stay still. Can I have that script, plz. Thanks

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,
    You don't need JavaScript to do that but CSS.
    Here's a link: http://www.devguru.com/Technologies/...css_index.html
    And some code:

    <html>
    <head>
    <title></title>
    <style type="text/css">
    <!--
    body {
    background-color:#cccccc;
    background-image:url("clouds.gif");
    background-attachment:fixed;
    }
    -->
    </style>
    </head>
    <body>

    </body>
    </html>

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Depends on the time of year
    Posts
    478
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you can adjust your body tag as well:

    <body background="name_of_image" bgproperties="fixed">

    Duniyadnd

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Deprecated...

    The "background" attribute from the body element is deprecated in the more recent versions of (X)HTML, the "bgproperties" attribute isn't even in the standard, not in HTML 4.01 anyway; the CSS solution therefore is the preferred method.
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

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