Welcome to WebmasterWorld Guest from 54.226.246.160

Forum Moderators: not2easy

Message Too Old, No Replies

All my A href links are styles the same.

how to change one?

     

akmac

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

10+ Year Member



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!

g1smd

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

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



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?

DrDoc

9:09 pm on Jul 30, 2013 (gmt 0)

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



... 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 {}

akmac

9:41 pm on Jul 30, 2013 (gmt 0)

10+ Year Member



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. ;-)

lucy24

10:12 pm on Jul 30, 2013 (gmt 0)

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



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

akmac

10:34 pm on Jul 30, 2013 (gmt 0)

10+ Year Member



Thanks! You guys (and gal) are the best!

JD_Toims

11:05 pm on Jul 30, 2013 (gmt 0)

WebmasterWorld Senior Member Top Contributors Of The Month



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

Now that's funny!

g1smd

11:22 pm on Jul 30, 2013 (gmt 0)

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



<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.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month