PDA

View Full Version : CSS : defining a new tag


mpls2000
04-07-2003, 09:28 AM
Hi, I am using IE 5.5.
I want to define new tag which basically inherits all the properties from <A> except I don't want it to be underlined. So I did the following in my style.css file:
A
{
text-decoration:none;
color: #ffffff;
font-weight: bold;
}

But I found that it affects all the link which I used <a>.
So I am thinking to define a new tag so that only those links I want it to be not-underlined then I used it, and the rest will be using the defual.
But how should I do it? Please help me. Thank you.

Mhtml
04-07-2003, 01:16 PM
a.SecondaryLink {
text-decoration:none;
color:#ffffff;
font-weight:bold;
}


Define a class like that, you can use .anything_here I just used secondaryLink as an example.

Then you can do this to your links.

<a href="#" class="SecondaryLink">Link</a>


Just include the class attribute containing the name of the class defined earlier, which in this case is SecondaryLink... :)