WordPress.org

Ready to get started?Download WordPress

Forums

Trouble with Loops and Sprites (1 post)

  1. EnmnM
    Member
    Posted 1 year ago #

    I am modifying the twentyten theme (locally, so I don't have anything I can share.) I want, on the main post page, to have each post include 1 picture and a few lines of text before the "read more" link. The catch is I want this picture to be a sprite, and have a hover state. I was able to write the css and html code, but can't figure out the nuances of modifying the loop so that the background image changes for each post. I have:
    a.rollover {display:block; width:300px; height:200px; text-decoration:none; background:url("table.jpg");}

    where "table.jpg" is the main image in one post. However, for each post, that background image needs to change, and I can't figure out how to do it.

    Can you help? Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags