PDA

View Full Version : Problems getting the current page-link to be unique



Galrash
03 Aug 2010, 11:22 PM
I am trying to use CSS to setup my website so that whenever you are on a certain page, say aboutme.html for example. the "About Me" link on my menu is blue instead of grey like the rest of the links, so that it highlights which page you are currently on

However I cannot figure out how to get this to work for the life of me. I googled it and someone suggested creating a #current css style and then linking it to the <li id="current"> on the html side.

so I did this:

#current ul li a { color: blue; }

and then in my menu code I did <li id="current"><a href="aboutme.html">ABOUT ME</a></li>

Still nothing

any thoughts? the site is at http://bethanylawsonphotography.com/testing/aboutme.html

thanks

(also my <p> tags don't seem to be working? any idea why? )

Corrosive
04 Aug 2010, 02:25 AM
What you have posted here is correct but in the page you've linked the li tag has current set as a class and not an ID. I also looked in your CSS to make sure it matched and don't see the 'current' style at all. Fix these, make sure that if your styles are an id or a class it matches in your page HTML.

As for the paragraphs, I may be mistaken but I thought that XHTML should have lowercase in the tags. Both your paragraphs start as a capital <P> and end in lowercase </p>. Fix that and see what it does.