Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need a tabbed-menu template where the tabbed menu for the present page changes color. If possible, it should play nicely with browser that don't have JavaScript enabled.

Other then the tabs, I prefer a simple blank page without complicated CSS.

share|improve this question
What is your question? Are you familiar with Javascript and CSS? – danlefree May 17 '11 at 7:44
up vote 1 down vote accepted

One way of doing it is this. Each page has it's own class for the body, e.g.

<body class="tab3">

Each tab should have its own id, tab1, tab2, tab3 etc.

Then put a line like this in your CSS:

.tab1 #tab1, .tab2 #tab2, .tab3 #tab3 { color: selected colour }

You'll have to specify which element of the tab you want to be coloured, I've just put in "color".

Then when the body tab has the class tab3, tab3 will be the selected colour.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.