Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Adding current page image to CSS Sprite

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33311

    Hi

    I am trying to get a current page setting going for a sprite and have read a number of posts with regards on how to do this. It is for a single nav button and wanted to set the current page sprite as a different image within it.

    The html is



    and the css is

    /*Home Button*/

    a.home-button {
    background: url(../img/home.png) no-repeat 0 0;
    width: 92px;
    height: 40px;
    display: block;
    text-indent: -9999px;
    float:left;
    margin-right:0px;
    }

    a.home-button:hover { background-position: 0 -40px;}

    a.home-button:active { background-position: 0 -80px; }

    a.home-button:current { background-position: 0 -120px; }

    it obviously doesn’t work and am getting quite confused with alternatives. Any Idea’s appreciated. I would like to set the a.home-button:current position as the default image when displaying that page. Then do the same for the remaining nav buttons.

    #83703

    Thanks for your help Eric

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.