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!

where can hyperlink behaviour be specified

Status
Not open for further replies.

mmaddox

IS-IT--Management
May 22, 2002
53
US
Is it possible to specify a class in a span (or div, or table, etc) that will allow hyperlinks to pick up the class behaviour without specifiying it in the <a> </a> tags?

I have this external CSS

.textmenu {font-size: 10pt; font-family: Arial; }
a:link.textmenu {color:blue; text-decoration:underline;}
a:visited.textmenu {color:blue; text-decoration:underline;}
a:hover.textmenu {color:red;text-decoration:none;}

What I want to do is this:

<span class = &quot;textmenu&quot;>
<a href=&quot;pdf/newsletter.pdf&quot;>Current issue</a>
</span>

and have the <a href= .... act as though I had done this:

<span>
<a class = &quot;textmenu&quot; href=&quot;pdf/newsletter.pdf&quot;>Current issue</a>
</span>

Thanx for any info.
 
.test{ font-family: courier; }
a:link, a:hover, a:active, a:visited{
text-decoration: none;
color: #333333;
}

... then

<span class=&quot;test&quot;>Testing <a href=&quot;ibm.com&quot;>IBM</a></span>
<br>
<a href=&quot;sun.com&quot;>SUN</a>

That does what you describe, i think, in IE6

-pete
 
Try this:

.textmenu a:link {color:blue; text-decoration:underline;}
.textmenu a:visited {color:blue; text-decoration:underline;}
.textmenu a:hover {color:red;text-decoration:none;}

-- Chris Hunt
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top