Can you use two different colors on a link rollover. Text/underline.

liunx

Guest
Hey,

I want to basically have the rollover text be one color, then I want a dashed underline to be another color. Is this possible?

Thanks.yes. to specify a colour you simply use
color: #000;
and to specify a underline you will have to use the border
border-bottom: 1px dashed #f00;Hey,

AWESOME!! Thank you. This is so simple but looks so amazing with my color scheme and layout. Just one issue. For some reason, the dashed border is affecting all of my different links i.e. a.link2. Here is some of my css:


a {
font-family: Verdana
font-size: 11px;
color: #000000;
text-decoration: none;
}

a:hover {
font-family: Verdana
font-size: 11px;
color: #0066CC;
border-bottom: 1px dashed #000;
}

a.link2 {
font-family: Verdana
font-size: 11px;
color: #0066CC;
text-decoration: none;

}

a.link2:hover {
font-family: Verdana
font-size: 11px;
color: #0066CC;
text-decoration: underline;
}


How do I stop the dashed border from infiltrating every link properties.

Thanks again.add
border-bottom: 1px solid #06c;or border: 0;Hello Bath,

Yea, that works perfect! Thanks again matey. Just one thing. I use A LOT of different links on my site, so I just want to know if this is the most efficient way to do this i.e. put the border: 0; on all of the different linnk properties. It just seems like I should be able to do this a different way, that didn't require that.

Thanks.well you can specify the links to have a border instead. Put them in a div with a class name... eg
.dash a:hover {
border: 1px dashed #f00;
}
<div class="dash">
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#">this link will have a dashed underline on hover</a>
</div>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"#">this link will not</a>Set your standard a:link, a:visited, a:hover, a:active with the most common used attributes, eg:

If you're going to be using no borders say 90% of the time then set your standard anchor border style to :none, then adjust for other anchor stylesBath,

You are THE MAN! That's exactly what I am looking for. This CSS is simply amazing. And thug, thanks so much for your input as well. I appreciate you taking the time to reply.

Cheers.
 
Back
Top