Log in

View Full Version : Matt Black Tabs



keelbolt
10-22-2008, 08:39 PM
The Matt Black Tabs CSS has a note against one of the styles:

.mattblacktabs li a:hover, .mattblacktabs li.selected a{
background: red; /*background of tabs for hover state, plus tab with "selected" class assigned to its LI */
}

(I have changed the background colour to 'red' myself)

The class to make the menu bar stay red on the selected page is 'a'

This class assignment presumably makes the tab on the active page the colour red when it is hovered over, and when it sees class 'a' on the active page.

But I don't know how to assign the class to the active / selected page so that the menu bar stays red. Please could someone explain how to do it?

Nile
10-22-2008, 08:55 PM
I don't completely understand what you want, but give this a try:


.mattblacktabs li a:hover{
background: red; /*background of tabs for hover state, plus tab with "selected" class assigned to its LI */
}
.mattblacktabs li.selected a {
background: blue; /*background for selected*/
}

TheJoshMan
10-22-2008, 10:09 PM
on each page, you have to add the class "a" to it's corresponding link in the menu... Say your menu has the links "Home", "About Us", & "Contact"

Then on the home page you would use:


<li class="a"><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact</a></li>


Then on the about us page:


<li><a href="#">Home</a></li>
<li class="a"><a href="#">About Us</a></li>
<li><a href="#">Contact</a></li>


And on the contact page:


<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li class="a"><a href="#">Contact</a></li>


See the trend? Hope all that made sense...