Welcome to WebmasterWorld Guest from 54.166.5.230

Forum Moderators: not2easy

Message Too Old, No Replies

All my A href links are styles the same.

how to change one?

     
8:38 pm on Jul 30, 2013 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 13, 2004
posts:497
votes: 0


I list my toll free number in the header of my site that links to my contact page. Currently, because it is linked, it is subject to this:

A{color:#666;text-decoration:none}
A:hover{color:#999}

How can I make it White all the time, underlined when the cursor hovers over it?

I need to change this one thing without affecting the rest of the linked text.

TYIA!
8:56 pm on July 30, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


Without seeing the rest of the code I'll have to guess.

Perhaps add a span round the number and add extra CSS to style that span differently?
9:09 pm on July 30, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


... or an ID or class name. Really, whatever you choose is fine. You may already be able to target that anchor, if its location is unique.

#someid a {}
#someclass a {}
someelem someelem someelem a {}
9:41 pm on July 30, 2013 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 13, 2004
posts:497
votes: 0


Wow, thanks for the rapid replies! Pardon my newbiness, I'm one of those "screen designers" trying to hack this minor change. How would I implement either the span, ID or Class to the following code on the page?


<td align="right" valign="top"><font style="font-size: 26px; white-space: nowrap; padding-right: 8px; " color="white" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><a title="Contact Us" href="http://learncss.youfool.com" target="_self">1-800-xxx-xxxx</a></td>


I think I can wrangle the changes to the stylesheet.css, but may be back shortly for that. ;-)
10:12 pm on July 30, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:13434
votes: 389


I need to change this one thing without affecting the rest of the linked text.

Set a class. If it's currently under generic <a> code than all you need to set is something like

a.special {color: white;}
a.special:hover {et cetera;}

paired with

<a class = "special" href = "/contact et cetera
10:34 pm on July 30, 2013 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 13, 2004
posts:497
votes: 0


Thanks! You guys (and gal) are the best!
11:05 pm on July 30, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member Top Contributors Of The Month

joined:July 19, 2013
posts:1097
votes: 0


<a title="Contact Us" href="http://learncss.youfool.com" target="_self">

Now that's funny!
11:22 pm on July 30, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


<a class="special" title="Contact Us" href="http://example.com" target="_self">1-800-xxx-xxxx</a>

That'll do it. Do this in place of the span I suggested.

You'll need a few extra lines in your CSS file to style the "special" class.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members