Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

CSS question

Aloittaja Krashsite, lokakuu 18, 2011, 02:44:16 AP

« edellinen - seuraava »

Sir Osis of Liver


I'm trying to change the link colors for the quickbuttons above the postarea -



ul.quickbuttons a:link
{
color: #0000FF;
}




Works fine until I add a:visited -



ul.quickbuttons a:link, a:visited
{
color: #0000FF;
}




The color takes effect, but it changes the a:visited color elsewhere on the forum - admin, messages, etc.  Since the color is specific to just this pseudo class, why is it  affecting other areas?

When in Emor, do as the Snamors.
                              - D. Lister

adela01

I also hope the issue concerns all help. Thank you very much.

Ricky.

Hey Krash..
I donno what you are trying to achieve but your second snippet should be :
ul.quickbuttons a:link,ul.quickbuttons  a:visited
{
color: #0000FF;
}


Try that and let me know :)

Antechinus

Ricky is correct. The way you had it, it definitely would hit every visited link on the page. An attribute after a comma in CSS does not read what comes before the comma. It's code, not a sentence. ;)

Sir Osis of Liver


That fixed it, thanks.

One odd thing I found last night, when I deleted all the a:visited styles from index.css, it displayed visited links in an awful purple color (810081) that does not exist in index.css.  How can it display a color that's not in the code?

When in Emor, do as the Snamors.
                              - D. Lister

Antechinus

That's default HTML behaviour when no style is specified. God knows why they chose those colours, but they did. Try disabling CSS on a page and you'll see the effect. :).

Advertisement: