Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS question

Status
Not open for further replies.

LucyL

Technical User
Feb 20, 2002
113
US
Hi,
How do you specify a class for a link?
Thank you.
 
Did you mean pseudo-classes for the link object?

ie
Code:
:link {styles here}
:hover {styles here}

I don't think you can format individual hyperlinks according to class names - they all have to be the same (I think).

Of course I may have misunderstood your question also ...
 
no they dont

a.one
a.one:hover
a.two
a.two:hover

<a href=&quot;link&quot; class=&quot;one&quot;>i am one</a>
<a href=&quot;link&quot; class=&quot;two&quot;>i am two</a>

will be differend depending on you style definitions
[Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
The problem Deecee (and others such as myself) run into when using the a.one, a.two style methodology is that it's the first step on the slippery slope of detracting from the usability of your site.

Just because you can do it doesn't mean you should do it. Too many colours, unexpected things happening, expected things NOT happening only serve to drive visitors away.

Keep it simple so people don't have to think too hard to find their way around your site and they'll return.

Dave
 
well not really

what if you have a standard banner with links on that and a sidebar with links there. Do you really want both looking the same, same background, same text, same size, same hover even (i dont ilike variety)

besides 2-3 types of &quot;a&quot; classes I think are fine as long as they are in certain spots where people expect links, TOP, LEFT, BOTTOM and even sometimes RIGHT

Not to mention any link in text should be underlined our somehow highlighted to stand out.

Having multiple classes doesnt distract from the usability of your site as long as you are clear and consistent. Besides it adds some flava and also makes for better and cleaner websites. [Hammer]
Nike Failed Slogans -- &quot;Just Don't Do It!&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top