Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

current tag on li tag

Status
Not open for further replies.

multichild

Programmer
Jan 28, 2006
76
GB
Im using the current tag to indicate the current page which is controlled via css.

In a nav list, im putting the id="current" on the li tage and with a sub nav it means the other li tags become current when all i want is the one.

Can anybody help

lee

Accend Web Solutions

 
You've not given us much to go on, so I'm guessing you've got something like this:
Code:
li { color: black; }
li#current {color: white; }
(Obviously you'll have many more properties than this). You can't exclude the sub-items of the current <li>, but you can set them back to the non-current value:
Code:
li { color: black; }
li#current {color: white; }
[red]li#current li {color: black; }[/red]
Or, to be really slick
Code:
li, li#current li { color: black; }
li#current {color: white; }

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top