SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Apr 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Repeating CSS Sprites

    I'm almost sure this is impossible, but I thought I'd ask before I gave up on the idea.

    Most people know about the sprite technique, which is essentially that one combines all their style images (like bullet graphics, and icons, for example) into one larger image file and refers to them via CSS by the coordinates. This saves http requests and bandwidth.

    What I'd like to know is whether a similar technique can be applied to images meant to be background images that repeat. For example, if I have a geocities super awesome homepage with a chainlink fence background on the body and a butterfly background in the content window, is there a way to combine those into the same image, reference to them by their coordinates, AND make them repeat in the background?
    Bring out our hope and reason, before we pine away.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    I'm almost sure this is impossible, but I thought I'd ask before I gave up on the idea.
    Correct its impossible

    You can only repeat the whole image and not just a section of it.

    Although thinking about it you could probably repeat in one direction along a single line, as long as the element it was displayed in was only as wide (or as high if repeating vertically as the image you want to repeat).

  3. #3
    SitePoint Addict
    Join Date
    Apr 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's a good thought -- won't work for my particular situation, but it's something to bear in mind.

    I guess we'll just throw that feature with the rest that are easy to implement, impossible to roll out in the current browser climate 8/
    Bring out our hope and reason, before we pine away.


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
  •