Interview Questions

How do you show which page you're on (in a menu)?

CSS Interview Questions and Questions


(Continued from previous question...)

113. How do you show which page you're on (in a menu)?

If PHP is not available to you, you could use the cascade. Put an id in your body tags and an id in each of your 'a' tags for the links.
Let's say on page one you have this:
CSS
<body id="page1">
....
<a id="page1link" href="page1.htm">page one</a>
...
</body>

In your CSS, you can have something like this:
CSS
#page1 a#page1link {
color:purple;

(Continued on next question...)

Other Interview Questions