homepage Welcome to WebmasterWorld Guest from 54.81.170.186
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: DrDoc

CSS Forum

    
All my A href links are styles the same.
how to change one?
akmac




msg:4597802
 8:38 pm on Jul 30, 2013 (gmt 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!

 

g1smd




msg:4597813
 8:56 pm on Jul 30, 2013 (gmt 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?

DrDoc




msg:4597815
 9:09 pm on Jul 30, 2013 (gmt 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 {}

akmac




msg:4597821
 9:41 pm on Jul 30, 2013 (gmt 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. ;-)

lucy24




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

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




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

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

JD_Toims




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

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

Now that's funny!

g1smd




msg:4597854
 11:22 pm on Jul 30, 2013 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved