WordPress.org

Ready to get started?Download WordPress

Forums

CSS sprite to speed up my site (2 posts)

  1. albesco
    Member
    Posted 3 years ago #

    Hi

    In my pages I have to load 5 little and colored images, to comment each widget element (you can see in http://www.lemappedelpensiero.it/wordpress/ ).
    I've set them in the style.css file, to load as background image behind an empty text for widget names.

    Well.. I'm trying to use the "css sprite" method to speed up the download of my website elements and load a single image and "break up" it in the pages?

    Does it exist a plugin that makes this magic? :-)
    Maybe I'm asking too much to our dear WP environment? :-S

    Thanks a lot

    Alberto

  2. Ganners
    Member
    Posted 3 years ago #

    You would use 1 single background image and just offset it. I do recommend this though, it is good practice especially if you have hovers set.

    An example would be:

    #foo { background: url('../images/yourimage.jpg') repeat-x 0 0px; }
    #foo2 { background: url('../images/yourimage.jpg') repeat-x 0 25px; }
    #foo3 { background: url('../images/yourimage.jpg') repeat-x 0 50px; }

    The first number represents the horizontal position, and the second represents the vertical.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.