Saturday, April 24, 2010

Links, Precedence, Style-sheets, Oh my.

So I am currently developing my site and I wanted links to be different to my overall colour scheme for links. I therefore added a page style sheet to change them, no matter what I did, the overall one would take precedence instead of the page one.


a:link, a:visited,a:hover, a:active
{

text-decoration:underline;
color:#FFFFFF;
}



So I wanted to change it to just white underlined, this was first too over kill, since it was changing links in the footer. I then made it class based


.projectList a:link
{
text-decoration:underline;
color:#FFFFFF;
}


This still did not work for some reason, firebug showed my Site.css was winning now. (odd)

Thanks to ye-old faithfull W3Schools
I found :link pseudo classes http://www.w3schools.com/css/pr_pseudo_link.asp


This meant I could change it per link basis, (win) I now had.


a.downloadLink:visited
{
color:#FFFFFF;
}

and my link

Download



Now it bloody works!! :)

0 comments:

Post a Comment