Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > CSS link color problem

Reply
Thread Tools

CSS link color problem

 
 
Kathleen Coyne
Guest
Posts: n/a
 
      07-03-2003
For some reason, I just can't change the font color for hover. It
allows me to change the background color, no problem. But, if the
link is visited, it will not change the font color, if the link is
unvisited, then it will change the font color on hover.

Here is my CSS

#content a:link {
color: #CACBCA;
font-weight: bold;
}

#content a:hover {
background-color: #ffffff;
color: #048004;
font-weight: bold;
}

#content a:visited {
color: #CACBCA;
font-weight: bold;
}

any ideas?
 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      07-03-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (Kathleen Coyne) wrote:

>For some reason, I just can't change the font color for hover. It
>allows me to change the background color, no problem. But, if the
>link is visited, it will not change the font color, if the link is
>unvisited, then it will change the font color on hover.
>
>Here is my CSS
>
>#content a:link {
> color: #CACBCA;
> font-weight: bold;
> }
>
>#content a:hover {
> background-color: #ffffff;
> color: #048004;
> font-weight: bold;
> }
>
>#content a:visited {
> color: #CACBCA;
> font-weight: bold;
> }


If a link is visited and being hovered then which rule is applied? The
one specified last in the CSS. Swap the two rules around and hover
will apply to visited as well as unvisited links.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
 
PeterMcC
Guest
Posts: n/a
 
      07-03-2003
Kathleen Coyne wrote:
> For some reason, I just can't change the font color for hover. It
> allows me to change the background color, no problem. But, if the
> link is visited, it will not change the font color, if the link is
> unvisited, then it will change the font color on hover.


It's the cascade that's doing it - define them in the order
link
visited
hover
active

Currently, your visited definition comes after the hover so a visited link
that gets hovered has to decide on whether it will display as visited or
hovered - the latter definition takes precedence so you get a visited
appearance.

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.

 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      07-03-2003
<style>

<!--
A:link { color: #808080; text-decoration: none}
A:active { color: #808080; text-decoration: none}
A:visited { color: #808080; text-decoration: none}
A:hover { color: #FF0000; text-decoration: none}

-->
</style>

-Mike

"Kathleen Coyne" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> For some reason, I just can't change the font color for hover. It
> allows me to change the background color, no problem. But, if the
> link is visited, it will not change the font color, if the link is
> unvisited, then it will change the font color on hover.
>
> Here is my CSS
>
> #content a:link {
> color: #CACBCA;
> font-weight: bold;
> }
>
> #content a:hover {
> background-color: #ffffff;
> color: #048004;
> font-weight: bold;
> }
>
> #content a:visited {
> color: #CACBCA;
> font-weight: bold;
> }
>
> any ideas?



 
Reply With Quote
 
T.J.
Guest
Posts: n/a
 
      07-03-2003

"Kathleen Coyne" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> For some reason, I just can't change the font color for hover. It
> allows me to change the background color, no problem. But, if the
> link is visited, it will not change the font color, if the link is
> unvisited, then it will change the font color on hover.
>
> Here is my CSS
>
> #content a:link {
> color: #CACBCA;
> font-weight: bold;
> }
>
> #content a:hover {
> background-color: #ffffff;
> color: #048004;
> font-weight: bold;
> }
>
> #content a:visited {
> color: #CACBCA;
> font-weight: bold;
> }
>
> any ideas?


Remember,

Luther
Vandross
Has
Acne


 
Reply With Quote
 
P@tty Ayers
Guest
Posts: n/a
 
      07-04-2003
> Remember,
>
> Luther
> Vandross
> Has
> Acne



LoVe - HA!


--
P@tty Ayers
http://www.WebDevBiz.com
Web Design Contract, Estimate Worksheet
--

 
Reply With Quote
 
Jacqui or (maybe) Pete
Guest
Posts: n/a
 
      07-04-2003
In article <be283t$van$(E-Mail Removed)>, (E-Mail Removed)lid says...
>
> "Kathleen Coyne" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) om...
> > For some reason, I just can't change the font color for hover. It

....
> > any ideas?

>
> Remember,
>
> Luther
> Vandross
> Has
> Acne
>

For some reason 'links is over active' sticks in my mind:

_link_s
v_is_ited
h_over_
_active_
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
RE: Link Link Link =?Utf-8?B?REw=?= Windows 64bit 0 05-17-2005 12:15 PM
Re: Link Link Link DANGER WILL ROBINSON!!! Kevin Spencer ASP .Net 0 05-17-2005 10:41 AM
Problem with setting background color alternating item in datalist to a certain color fig000 ASP .Net Web Controls 0 09-06-2004 06:51 PM
Change text color of "visited link" back to unvisited color ??? Matt Adams HTML 0 08-26-2003 10:27 AM



Advertisments