CSS Help - Need to <a> definitions.

dsarosh

Adept
Hi,
I have a question about CSS. If I can find the answer here, that would be great, or else I will look elsewhere.

I would like to have more than one type of style definitions for links in a document. I want one set of links to be light blue, and then turn dark blue when hoovered over. I want yet another set of links to be maroon color, and just get underlined when moused over.

I am able to get one style definition for any one type of links. What I would like to have is to have two different style definitions for two different types of links within the same html page.

If someone can tell me how to achieve this, that would be great.
Thanks.
Sarosh
 
Define your page as
Code:
<Div class="Class1">
[url="url"]Ur URL 1[/url]
</Div>
<Div class="Class2">
[url="url"]Ur URL 1[/url]
</Div>

And your css as
Code:
.Class1
{

}

.Class1 a
{
/* ur style 1 for link 1 */
}

.Class2
{
}
.Class2 a
{
/* ur style 2 for link 2 */
}

Good luck
 
shotgun said:
Define your page as

Code:
<Div class="Class1">

[url="url"]Ur URL 1[/url]

</Div>

<Div class="Class2">

[url="url"]Ur URL 1[/url]

</Div>
And your css as

Code:
.Class1

{
}
.Class1 a

{

/* ur style 1 for link 1 */

}
.Class2

{

}

.Class2 a

{

/* ur style 2 for link 2 */

}
Good luck

Beat me to it, was going to post the same thing using two classes !
 
^^yes u can do it either using

1. class(as mentioned above)

2. id

next time for any such queries visit "www.w3schools.com", it is a great reference.
 
Back
Top