View Full Version : Colour with circular references

05-11-2011, 11:29 AM
Hi Everyone.

I'm a new member and so please forgive me if I don't immediately understand all the jargon.

However I have a problem and I was hoping someone might be able to help. I have searched the web and W3 schools but couldn't find the answer I was looking for.

I am using strict HTML with an external CSS style sheet.

I have a several paged website I am creating for part of a University assignment.

I have several links which have 3 colours for 3 states. Link, visited and highlight.

These work perfectly. (For me anyway).

I have now been told to remove 'circular references'. I understand this to be;

If I am on the 'Home' page, then 'Home' is no longer a link. (The cursor turns to a text bar instead of a hand)

I have removed href from the html to stop this happening. leaving just

This is fine, however, the colours that I specified in the css now no longer apply and the text is just black.

I have followed the instructions in the web pages that I have seen to retain the colours, or add them to an inline style sheet, but nothing seems to work.

I can only achieve adding one colour (but not making it change when visited or hovering) or changing the colour of ALL links.

Sorry if this is confusing.. I hope someone can help!
The relevent code is below.

<style type="text/css">
.homebut a:link {color: red;}
.homebut a:visited {color: purple;}
.homebut a:hover {color: orange;}
<!--none of the above seems to work-->
<div class="homebut">

/*This is applied to all links but doesn't work when I remove HREF from the HTML*/
a:link { COLOR: #0099FF; text-decoration:none;}
a:visited { COLOR: #00FFFF; }
a:hover { COLOR: #FFFFFF; }

05-11-2011, 11:49 AM
Sorry guys... this always seems to be the way.

I've spent hours on trying to work this out and then within minutes of posting a help message I fix it!!

I just needed to replace "a:link" with a set colour!

.homebut {color:#0099FF;}
.homebut a:visited {color:#00FFFF;}
.homebut a:hover {color:#FFFFFF;}

Thanks anyway, but I'm sure i'll be back with more questions!