Highlight Tabs

Help please. i am designing my first web site and am using drop down sliding menus. The only thing I can’t figure out and believe me I’ve tried everything is how to have the tab stay the same color as the hover state while in that particular tab. Here is my current css. I appreciate any help!

jqueryslidemenu {
font: bold 12px calibri;
background: #FFF;
width: 100%;
}
.jqueryslidemenu ul {
margin: 0;
padding: 0;
list-style-type: none;
color: #2A1F00;

.jqueryslidemenu ul li {
position: relative;
display: in-line;
float: left;
font-size: 15px;
color: #FFF;
}

.jqueryslidemenu ul li a {
display: block;
background: #A85400;
color: white;
padding: 8px 45px;
border-right: 1px solid #778;
color: #2d2b2b;
text-decoration: none;
background-color: #002868;
}

  • html .jqueryslidemenu ul li a
    display: in-block;
    background-color: #912F00;
    }
    .jqueryslidemenu ul li a:link, .jqueryslidemenu ul li a:visited {
    color: white;
    }
    .jqueryslidemenu ul li a:hover {
    background: #960;
    color: while;
    background-color: #912F00;
    }
    .jqueryslidemenu ul li ul {
    position: absolute;
    left: 0;
    display: block;
    visibility: hidden;
    }
    .jqueryslidemenu ul li ul li {
    display: list-item;
    float: none;
    }
    .jqueryslidemenu ul li ul li ul {
    top: 0;
    }

.jqueryslidemenu ul li ul li a {
font: italic 14px calibri;
width: 160px;
/width of sub menus/
padding: 5px;
margin: 0;
border-top-width: 0;
border-bottom: 1px solid gray;
}

My website is not finished but you can see what I’ve done thus far if it helps. Website.html

jwest

You have to add a class for example “currenttab” on relative item. And than just assign css to this currenttab.

There are different different ways to assign dynamic class. Depends on how you are generating you menu. If you are generating your menu dynamically by php or other language than it’s easy. you have to write down some code to decide that current page is child of which top menu item or current page is top menu itself than assign class.

If static than you have to assign some class name to each top menu item and than add css to html page itself to set colour.

Let me know if you need further guide.

Cheers