treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Horizontal stretching+vertical tiling background image

  • I'm starting work on a site that I'd like to have the background image stretch horizontally to adapt to different screen sizes so the background fills the entire screen, but tile vertically to adapt to content.
    I can do the tiling of course with background-repeat:repeat-y, and I can stretch the image horizontally using img#bg {
    position:fixed; top:0; left:0; width:100%; background-attachment: scroll
    But I can't seem to accomplish both. I'm thinking it might be best just to ask the artist to give me the background image as 1248px, and users with smaller screens won't see the far right of the image (not a big deal if designed right)
    Any advice?
    Thanks from a newbie.