View Full Version : CSS selector working on one <a>, not another?

11-25-2012, 07:00 AM
I've got a straightforward selector changing link colors as such:

#content a {
text-decoration: none;
color: darkblue;
font: 16px 'arial';
#content a:hover {
text-decoration: underline;
color: blue;

On one html page I have:

<a href="catalogues.html">catalogue</a>

On another page I have:

<a href="contact_us.html">please click here for our contact info.</a>
On their respective pages, both these <a> elements appear within a div named 'content'. The first html line behaves as expected, the link is darkblue, and gets underlined, changes to blue on hover - the second <a> appears in black, and stays in black on hover, although it does get underlined as well. While experimenting, I've taken the second line and placed it right next to the first <a> in the html file and it still doesn't behave correctly! When I use 'inspect element' feature in browser, both <a>s appear to be using the exact same css. What is going on here?!!

11-25-2012, 07:56 AM
lol sorry found my problem - i had an a:visited way down in css setting black...