Results 1 to 3 of 3

 

Thread: Use two background images in a page

  1. #1
    accelerator's Avatar
    Online shopping rocks!

    Status
    Offline
    Join Date
    Nov 2004
    Location
    England
    Posts
    3,034
    Thanks
    54
    Thanked 183 Times in 164 Posts


    Hi All

    I have to use a complex background image at both the top and bottom of my page. I don't want to use a single file, as that would mean the file size is getting rather large, so is there a way to use two separate background images? I tried using two different stylesheets each containing a body style, but that didn't work.

    Thoughts anyone?

    Thanks

    Accel

  2. #2
    Registered User

    Status
    Offline
    Join Date
    Jun 2004
    Posts
    145
    Thanks
    0
    Thanked 2 Times in 1 Post
    How about trying two absolutely positioned divs one on top of another. Each div has a different background.

  3. #3
    Registered User

    Status
    Offline
    Join Date
    Aug 2003
    Posts
    2,448
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Make an image for the top and assign it to the body tag, then make a div that covers the whole page and assign the bottom image to that.
    something like
    Code:
    html {
      height:100%;
    }
    body {
      margin:0px;
      padding:0px;
      height:100%;
      background: url(/topimage.jpg) repeat-x center top;
    }
    .contents {
      height:100%;
      background: url(/bottomimage.jpg) repeat-x center bottom;
    }
    Code:
    <html>
    <body><div class='content'>
    ...
    </div></body>
    </html>
    That is off the top of my head with no testing so you may need to play about with it a bit.



Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Webservices, Images and Legal issues
    By scifind in forum Affiliate Marketing Lounge
    Replies: 0
    Last Post: 10-11-05, 03:08 PM
  2. Valentines Day Web Page and Offers
    By TD Nick in forum TradeDoubler
    Replies: 3
    Last Post: 28-01-05, 11:05 AM
  3. Dreamweaver Page Layout
    By Shane in forum Programming
    Replies: 8
    Last Post: 07-06-04, 02:59 PM

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
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2