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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On page load, change rollover state

Status
Not open for further replies.

mawilliams

Technical User
Jun 20, 2003
30
GB
Hi,

I have a side navbar which changes from page to page, but they are all used on more than one page. The navbar is simply a table and using css the table cells change colour when rolled over. Is there a way of having the cell change to the down state or hover state when you enter a new page, so it's easier for the user to see which section they are in.

I'm not using a frameset, the links just open a new html document. Also the navbar is a Dreamweaver template, so I can't just change the css property on each page.

Cheers
 
Not sure of your exact set up, but I do a similar thing on my own site.

Basically, set each item in your menu to have a unique class, such as "menuHome", "menuAbout" that sort of thing.
Then when you load a new document in, have it set a style for the relevant class.

So when the "About me" page loads you would set a style at the top of that document such as:

Code:
.menuAbout { color:#ff0000; }

 
Thanks for your help on this one Foamcow.

It was a little tricky with all te Libary items and Templates I have in the site. But with your advice, I eventually got it working a treat.

Many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top