• EThire

    (@etuibenaucom)


    Hi,

    I’m trying to make some small changes to my website (www.etuibenau.com), but these small changes are becoming BIG problems. I’m trying to make the thumbnails on my ENTIRE site change from B&W in normal state to color when you hover. It seems my best option is css sprite, please let me know if you have a better solution.

    So far I have this code

    a{
    display: block;
    background: url(sprite.png) no-repeat;
    height: 150px; width: 310px; }

    a:hover{background-position: 0 -150px; }

    I don’t where to paste it within ‘index.php’ seen below

    <?php
    $values = get_post_custom_values(“thumbnail”);
    if (isset($values[0])) {
    ?>
    ” rel=”bookmark” title=”<?php the_title(); ?>”><img src=”<?php $values = get_post_custom_values(“thumbnail”); echo $values[0]; ?>” alt=”” />
    <?php } ?>

    Also what should ‘a’ and ‘sprite.png’ be in the following?

    a{
    display: block;
    background: url(sprite.png) no-repeat;
    height: 150px; width: 310px; }

    a:hover{background-position: 0 -150px; }

    I thought sprite.png might be something like ?php $values = get_post_custom_values(“thumbnail”)

    Any help will be appreciated, thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Where to add css sprite code in wordpress theme?’ is closed to new replies.