Forum Moderators: open
a:link {
text-decoration:none;
}
a:visited {
text-decoration:none;
}
a:hover {
text-decoration:underline;
}
I think my site would look a lot better...
Just a word of caution here. The underline as an indicator for links has been the accepted convention for links since the beginning of the web. If you choose not to follow this (or any) convention, you may find that many users are not as comfortable with your site as they might be, and they may tend to view fewer pages per visit. So make sure you don't eliminate all obvious visual cues for links in a move for visual beauty. Instead replace the underscore with some other obvious cue that does not require hovering to be seen.
From architecture we know that "form follows function". If you allow aesthetic factors to overrule functional issues, then you may find that your site under-performs.
I work under the assumtion that if the links are obviously links, without the underline, ie, they are in a link list location(?) then you may not need the underline. I feel that if you are including links in your body content then they should normally underlined..
If, in the 'navigation' area of your site, you have a bullet list of site titles, then I would say you could rely on a wide average of visitors realising that each bullet point is a link, without needing the underline.
If, on the other hand, your links are in your main text, you might need to underline them, to add emphasis to their link status. Assuming you want visitors to find your links, of course. :)
do you really need this:
a:visited {
text-decoration:none;
}
as long as you don't want the visited link to behave differently from the "untouched" ones?
Thanks for pointing out the meaning of underlining a link .... Just did it on our benchmark - and - testing site. If purple for visited links is good enough for Google, it should definitely be good enough for me, so I added that back in as well. It doesn't look nicer than before, but if it helps .... Only deviation from standard: all outgoing links have a little icon (CSS via class attribute) telling the visitor he's leaving our website.
I'll post the results next Saturday.
nerd
Added:
On some sites I make the links navy instead of the traditional blue, so they look a bit better but are still underlined so they're easily recognizable as being links.
[edited by: Marcia at 4:02 am (utc) on Nov. 25, 2006]
do you really need this
As you noted, it depends on what behavior you want. I was assuming that the desire was not to show underlines ever, except on :hover. Plus some browsers do not show the :hover pseudoclass behavior in all situations without a :visited rule preceding the :hover rule. So I find it best to always list :visited explictly whenever I declare :hover.