CSS - two types of anchors in same html

Assembled / ASSEMBLED
February 4, 2010 at 03:00:07
Specs: Vista Ultimate, E6550, 4GB DDR2
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

Sarosh


See More: CSS - two types of anchors in same html

Report •


#1
February 4, 2010 at 04:03:44
Hi Buddy!!!

Why can't we use css in macro media perfectly than the .net programming.. can you reply me soon.. meet again...

Web Services Chennai | Seo Company Chennai


Report •

#2
February 4, 2010 at 06:08:58
If I understand your *question* right, then you might try something like.

<style type="text/css">

.link1 {
   color: # some color;
   text-decoration: none }
.link1:hover {
   color: # some color }
.link2
   color: # some color;
   text-decoration: none }
.link2:hover {
   color: # some color;
   text-decoration: underline }
</style>

<a class="link1" href="#">class1</a>
<a class="link2" href="#">class2</a>

or perhaps

<style type="text/css">

#link1 a {
   color: # some color;
   text-decoration: none }
#link1 a:hover {
   color: # some color }
#link2 a {
   color: # some color;
   text-decoration: none }
#link2 a:hover {
   color: # some color;
   text-decoration: underline }
</style>

<div id="link1"><a href="#">style1</a></div>
<div id="link2"><a href="#">style2</a></div>

HTH


Report •

Related Solutions


Ask Question