Forums

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

Home Forums CSS Add-on to Help with Nave (nav) block..

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #33690
    Casey
    Member

    Okay I got things sorted with the navigation.. Thank you jamy_za! But, now since my images are sprites, what code would I be needing to use if I want the ‘current’ page part of the sprite used? And how can I make sure whenever I switch pages, the correct ‘current’ will be seen? I have the other two states working.

    #84153
    TheDoc
    Member

    Depends on the system that you’re using, but you’ll need to add a class to the current page’s li.

    For example:

    #84156
    Jeager
    Member

    I used to wonder this all the time, but its pretty simple. Have the body tag have a different ID on each of your pages. For example

    After that in your css use something that targets the body and the ul li a, so only when the css can target the current body ID, will that anchor be lit up.

    #bodyID #navID ul li a {background-position:bottom;} 

    #bodyID2 #navID2 ul li a {background-position:bottom;}
    #84157
    Casey
    Member

    I am building a theme on WordPress..

    #84158
    TheDoc
    Member

    Wordpress makes it even easier!

    I would use their built-in menu function which will automatically add the classes for you.

    You’ll need to change your class names in your CSS file to match what WP outputs so that your sprites will still work.

    #84159
    Casey
    Member

    you lost me? built-in function? Where?

    #84160
    Casey
    Member

    omfg never mind .. I will strangle myself later.. I been watching very old tutorials for WP.. CHRIS!! Make an updated .PSD Webpage to WP tut/video!!!

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