How could I put a global command in my external CSS file so that I could make all my links not change color when clicked, visited or active? I thought it was:
A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
at the top of the css file, but it doesnt work:(
cozoe
03-01-2009, 09:39 AM
Hi... try this accept define the color you want so they are all the same if you don't want the links to change. You are also missing the symbol ; in the code.
A:link {color: #000; text-decoration: none;}
A:visited {color: #000; text-decoration: none;}
a:hover {color: #000; text-decoration: none;}
A:active {color: #000; text-decoration: none;}
Replicada
03-01-2009, 10:45 AM
Hi... try this accept define the color you want so they are all the same if you don't want the links to change. You are also missing the symbol ; in the code.
A:link {color: #000; text-decoration: none;}
A:visited {color: #000; text-decoration: none;}
a:hover {color: #000; text-decoration: none;}
A:active {color: #000; text-decoration: none;}
Just to be fussy -->
a:link {color: #000; text-decoration: none;}
a:visited {color: #000; text-decoration: none;}
a:hover {color: #000; text-decoration: none;}
a:active {color: #000; text-decoration: none;}
--> Sets all link status to no decoration "Underline, overline, both...etc" to none, and all links will have color black "#000".
';' Is the 'Terminator' symbol, and must always be used in most languages to tell the compiler where each command finishes. Lucky for you CSS is flexible, most other languages would scream at you for missing that...
spykawg
03-01-2009, 03:53 PM
Something else, use:
a:focus { outline:none; }
to remove the ugly dotted border in some browsers when you click on a link
zoobie
03-02-2009, 12:19 AM
same with javascript's onblur
SharedLayer-Craig
03-02-2009, 02:03 AM
I could be really really fussy and say this could be somewhat non-compliant with W3C's WCAG standards. Accessibility and Usability can go a long way.
It is useful to do different colours/decorations for hover and normal link to define whether the mouse is pointing over that certain link or whether it's clicked etc.
I can't stand the "ugly dotted outline" either but I can't stand even more the idea of making links have no emphasis in any way. It'll just look like plain black text to me.
But fair enough if that's only an example :D
I know not many people care for W3C standards but compliance is compliance.
Replicada
03-02-2009, 05:21 AM
I could be really really fussy and say this could be somewhat non-compliant with W3C's WCAG standards. Accessibility and Usability can go a long way.
It is useful to do different colours/decorations for hover and normal link to define whether the mouse is pointing over that certain link or whether it's clicked etc.
I can't stand the "ugly dotted outline" either but I can't stand even more the idea of making links have no emphasis in any way. It'll just look like plain black text to me.
But fair enough if that's only an example :D
I know not many people care for W3C standards but compliance is compliance.
Couldn't agree more. It is a shame not all websites are forced to abide by the standards, for the web would be a far cooler place...
SharedLayer-Craig
03-02-2009, 10:06 AM
Couldn't agree more. It is a shame not all websites are forced to abide by the standards, for the web would be a far cooler place...
Glad to see that!
People can STILL make great looking and fantastic fancy looking websites, even Flash websites and still make them standards compliant. You just gotta look deeper into it.
I mean, I know visually impaired people (and other disabilities) area minority compared to the average customer but there is 2 million visually impaired people in the UK and I bet a good 3-5 times as much in the US and even more in other countries put together.
That's potential customers.
And I've had a few design jobs for disabled people, I've had a few hosting clients who are disabled.
I mean, if you look on Facebook so many disability groups on there, I'm sure they'd be well up for having a website so long as it was accessible. And Facebook isn't the most accessible place on the web either.
Geez, I rant on about accessibility and usability too much, but I do know a few tricks with CSS if anyone asks :D
My point is, W3C/Section 508/WCAG and others, are all GOOD things. You don't HAVE to put the poxy badges on the site to prove it, just be compliant and be happy, I personally think it makes better X/HTML/CSS Coders too.