Forum Moderators: open
1) Hyperlinks are being shown underlined which I don't want.
2) Hyperlinks are changing colors after being visited.
I used this code :-
a:link { color:#ffffff; text-decoration:none}
a:visited { color:#ffffff; text-decoration:none}
a:hover { color:#80B3FF; text-decoration:none}
a:active { color:#80B3FF; text-decoration:none}
This removes the underlines and changes the colors of links when the user moves the mouse onto them. Works fine for IE but not Mozilla - Any ideas?
"...just always seemed stupid ..."
True. Personally I have a habit of adding the last semi, mainly because that way I can copy and paste the line to other style classes in the .css file, and also so that I can add another attribute at the end of the list without foirgetting to put the semi before it.
Shawn
You gotta love the /* comment... */ it can go most anywhere in your CSS statements!
Try trimming the "fat"...
Consider style groupings--and make use of the cascade:
a { text-decoration: none;}
a:link, a:visited {color: #fff;} /* you can delete a:link since the initial anchor style covers it-and, use hex shorthand where possible. */
a:hover, a:active {color: #80b3ff;}
I always use the ending semi-colon because I got tired of going back to search for broken, cut n' paste code.
Write well, code clean, design with intent.
I had the very same problem too, and it was due to writing comments in the CSS like this:
// comment
which is wrong.
The only way comments may be noted in CSS is as follows:
/* comment */
Can also be more than on one line:
/*
Comment
More comment
Oh come on
*/
I am not happy with IE also be forgiving on that one.
I had the very same problem too, and it was due to writing comments in the CSS like this:// comment
But my real question is to papabaer. How did you know it had to do with comments? That is awesome mental telepathy!