Do All image in a CSS stylesheet get loaded?

Discussion in 'CSS' started by devtrench, Dec 31, 2007.

  1. #1
    I feel stupid for asking this, but I always assumed the answer was no. But does anyone have a definitive answer for my question: "Do all images in a css stylesheet get loaded when the css gets loaded?". I'm asking because a popular web page size service has led me to believe that answer is yes, that they do. So I was wondering if anyone knows for sure.

    Thanks,

    James
     
    devtrench, Dec 31, 2007 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    If no elements USE the image that's listed in the CSS, then no, it does NOT get loaded. This is why single image 'sliding background' mouseovers are preferred over separate image ones when working via CSS - combining the two separate images (or multiple images) to a single file means there's no 'delay' waiting for another file to load on mouseover.
     
    deathshadow, Dec 31, 2007 IP