www.webdeveloper.com
Results 1 to 4 of 4

Thread: background help

  1. #1
    Join Date
    Jun 2005
    Posts
    33

    background help

    how do yuo make it so that you display an image as a background ONCE and then another is reapeated after that forever?

  2. #2
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    So two background images, one repeated one not? Can't be done in one element but if you put a div in then you can give that a non-repeating background (with it's colour as transparent).

  3. #3
    Join Date
    Jun 2005
    Posts
    33
    explain how you do that please

  4. #4
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    Well you'd define a repeating background for your body element as usual. Then wrapping around everything else, like another body element, you'd have a div with a non-repeating background, as you'd usually define that.
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    <title>The Page with two backgrounds.</title>
    <style type="text/css">
    body{background: url(repeatable.png) #ccc;}
    div#container{background: url(unrepeatable.png) no-repeat transparent;}
    </style>
    </head>
    <body>
    <div id="container">
    <h1>The Page with two backgrounds</h1>
    <p>Some hoopy content would go here</p>
    </div>
    </body>
    </html>

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