Thanks for your reply, Otto42. When I view the source of my Categories list, it shows me this:
<li id=\\"Categories\\">
<h2>Categories</h2>
<ul>
<li><a href=\\"https://www.yorkrules.com/yorkrules3/wordpress/?cat=1\\" title=\\"View all posts filed under Home\\">Home</a>
<ul class='children'>
<li><a href=\\"https://www.yorkrules.com/yorkrules3/wordpress/?cat=4\\" title=\\"View all posts filed under learn\\">learn</a>
</li>
<li><a href=\\"https://www.yorkrules.com/yorkrules3/wordpress/?cat=3\\" title=\\"View all posts filed under look\\">look</a>
</li>
<li><a href=\\"https://www.yorkrules.com/yorkrules3/wordpress/?cat=5\\" title=\\"View all posts filed under play\\">play</a>
</li>
</ul>
</li>
Home is 1, learn is 4, look is 3, etc.
I would like the Home button on the navbar to be white when I’m on the Home page, the learn button to be red on the learn page, and the look button to be yellow on the look page, etc.
My CSS that makes the navbar do this looks like:
body#indexPage li#index {
background-image: url(../images/nav/navIndexGray.jpg);
}
body#learnPage li#learn {
background-image: url(../images/nav/navLearnColor.jpg);
}
body#lookPage li#look {
background-image: url(../images/nav/navLookColor.jpg);
}
body#playPage li#play {
background-image: url(../images/nav/navPlayColor.jpg);
}
body#readPage li#read {
background-image: url(../images/nav/navReadColor.jpg);
}
body#sharePage li#share {
background-image: url(../images/nav/navShareColor.jpg);
}
body#shopPage li#shop {
background-image: url(../images/nav/navShopColor.jpg);
}
#index {
background-image: url(../images/nav/navIndexGray.jpg);
}
#learn {
background-image: url(../images/nav/navLearnGray.jpg);
}
#look {
background-image: url(../images/nav/navLookGray.jpg);
}
#play {
background-image: url(../images/nav/navPlayGray.jpg);
}
#read {
background-image: url(../images/nav/navReadGray.jpg);
}
#share {
background-image: url(../images/nav/navShareGray.jpg);
}
#shop {
background-image: url(../images/nav/navShopGray.jpg);
}
Instead of referring to the pages as #look, #learn, etc., how do I use .current-cat and the category numbers (1, 4, 3, etc.) to specify the CSS rule selectors?
If you could write me a sample selector, or clarify my thinking, I’d appreciate it.
Thanks.