SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2000
    Location
    montreal
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I recently read some advice on how to use a single, large background image, and to get it not to tile when viewed at larger resolutions, (i.e. to get it to stretch to to the browser's display area). I can't find this advice anymore, and so was hoping someone would be willing to repeat it or give their input. Thanks to all.

  2. #2
    Your Lord and Master, Foamy gold trophy Hierophant's Avatar
    Join Date
    Aug 1999
    Location
    Lancaster, Ca. USA
    Posts
    12,305
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The only way to get an image to stretch to the user's resolution is to use DHTML through javascript to write out the image tag in a layer with a negative z-index. That said you can find examples on how to do this at sites like projectcool.com or siteexperts.com.

    If you just want to center a background and have it not tile or repeat then you can use CSS. This solution is a lot more elegant and only requires two lines in your style sheet.
    background-position:center;
    background-repeat:no-repeat;

    If you go to www.webreview.com in the Style Sheets section they have a lot of mini-tutorials on using CSS in your design. One of those tutorials covers background properties.

    ------------------
    Wayne Luke
    Internet Media Provider


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
  •