This page shows you how to implement Tab Menu using CSS.
Click on the tab on top of this page. You can see that pages get switched and the corresponding tab gets highlighted. Here's how this is done in pure CSS.
Let's say you want a tab menu for 3 pages, A, B, and C. Put this into the top of page A:
<ul id="pageA" class="tabs"> <li id="a"><a href="a.html">Tab A</a></li> <li id="b"><a href="b.html">Tab B</a></li> <li id="c"><a href="c.html">Tab C</a></li> </ul>
Similarly, put them into page B and C but use id="pageB" and id="pageC".
Then, all you have to do is use the style sheet to control how your tab should look. Notice that in the above code there's id="pageA". So, in your style sheet, you specify a appearance for tag that match “pageA”. Like this:
#pageA #a {background-color:red} #pageA #b {background-color:silver} #pageA #c {background-color:silver} #pageB #a {background-color:silver} #pageB #b {background-color:red} #pageB #c {background-color:silver} #pageC #a {background-color:silver} #pageC #b {background-color:silver} #pageC #c {background-color:red}
For how to use CSS to render list items as tabs, see: Flowing List Items.