Advanced Search

Results 1 to 2 of 2

Thread: Setting a full screen background image

  1. #1
    Join Date
    Feb 2007
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Setting a full screen background image

    I'm pretty sure this is a simple question, but I've searched for awhile and can't find how to do it.

    I want to set a background image on my website that only appears outside the fixed-width of the website edges. I know how to set a background image to repeat, but having a static, one-time image is baffling me. Is it one image? Or is it a separate image for the left and right?

    The style I'm looking for is similar to the ads that appear on www.gamespot.com and other sites that take advertising like that. The only difference is that I don't need it to coordinate with content inside the web window.

    Can someone enlighten me?

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Code:
    html, body {
       margin:0;
       padding:0;
       background-image:url(relative/path/to/image);
       background-repeat:no-repeat;
       background-attachment:fixed;
    }
    
    #container {
       margin:0 auto;
       width:900px; /* your fixed width */
    }

  3. The Following 2 Users Say Thank You to Medyman For This Useful Post:

    Objectivity (09-16-2008),SpOrTsDuDe-Reese (09-16-2008)

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
  •