www.webdeveloper.com
Results 1 to 10 of 10

Thread: Background help

  1. #1
    Join Date
    May 2003
    Posts
    3

    Background help

    Hi, just had a quick html question. How do i get the back ground to stay the same and for everything to move on top of it? Im just starting to learn html and cant find any tutorials on the web on how to do this. Any help is appriciated.

    So far, all i have is this:

    <body background = "/image/bob.jpg">

  2. #2
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    If bob.jpg is in the /image/ folder, that code should work, although you don't need spaces after the equals sign (=).


    <body background="image/bob.jpg">


    Jona
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  3. #3
    Join Date
    May 2003
    Location
    Spokane, WA.
    Posts
    2
    <body background="http://www.address/bluebg.gif" bgproperties=fixed>

    Last edited by R/CAreUs; 05-30-2003 at 02:39 PM.

  4. #4
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Originally posted by R/CAreUs
    <body background="http://www.address/bluebg.gif"bgproperties=fixed>
    First of all you need a space after the quote before the bgproperties attribute. Second, bgproperties is not valid HTML 4.01 Transitional and it will only work in Internet Explorer. If you would like this effect, however, you could try to use the background-attachment property of CSS:


    <style type="text/css">
    <!--
    body {background-image: url(/image/bob.jpg);
    &nbsp; &nbsp; &nbsp; background-attachment: fixed;}
    -->
    </style>
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  5. #5
    Join Date
    May 2003
    Location
    Spokane, WA.
    Posts
    2
    <style type="text/css">
    <!--
    body {background-image: url(/image/bob.jpg);
    background-attachment: fixed;}
    -->
    </style>

    Are you saying that the above is valid HTML 4.01 ?

  6. #6
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    I'm saying that if you use the W3C HTML 4.01 Validator with that code, you will see that it is considered invalid HTML.. Even in a Transitional Doctype.

    Jona
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  7. #7
    Join Date
    May 2003
    Posts
    3
    Thank you. Will try this code and see if it works. Looked at the link and not sure if that what i am after. What i am trying to do is have one image in the background, a picture, that is not tiled and does not move. It just fills the screen up and fits on the screen, and all the text and other parts of the site scroll on top of the picture. Ive seen it on a few sites and it looks cool.

  8. #8
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.

  9. #9
    Join Date
    Jun 2003
    Posts
    26
    The background-attachment: fixed in css should do it. The back ground will stay when you scroll up or down. Only the foreground text or image will scroll.
    Byzhosting Networks
    Dedicated Server, Reseller Hosting, Web Hosting, Email Hosting
    Quality, Affordable and Reliable Hosting Solution for eBusiness since year 2000.
    Web Host Magazine & Buyers' Choice Award Winner.

  10. #10
    Join Date
    May 2003
    Posts
    3
    Woot! Thank you so much for the help =) It worked ad is exactly what i was looking for! Again, thank you so much for the help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles