Login | Register | FAQ
Anonymous

Link Hovering

+ Post a reply

4 posts Page 1 of 1


Link Hovering

by caycebelieves » Fri Jul 17, 2015 7:27 pm

I needed to remove a link underline upon hovering in my content, which worked, but I also wanted to change the color, which didn't work. What am I missing? The underline is gone now, thankfully, but the color part isn't showing.

#content a:hover {
color:purple;
text-decoration:none;
}
User avatar

caycebelieves

  • Posts: 2
  • Joined: Fri Jul 17, 2015 7:23 pm

Re: Link Hovering

by brenko.web » Tue Jul 21, 2015 5:25 pm

At this link you should find everything you need; just scroll down to the example itself:
http://www.brenkoweb.com/tutorials/css/ ... lasses.php

If you want to have #content a:visited { color: purple } it shows something else (let say green), it may be a few things.

For beginning change purple to red and see if it works. Perhaps browser's default color is purple already and you can't see the difference. Red should override it.

If it still doesn't work, that means that some other selector is overriding it. Try to change code to this:

#content a:visited { color: purple !important } and see if it works.

Make sure that you don't have a child element under #content a so it does not override your command.


Tell me if you got it.

Regards

Last edited by brenko.web on Tue Mar 08, 2016 3:50 pm, edited 1 time in total.

User avatar

brenko.web

  • Posts: 7
  • Joined: Sun Nov 25, 2012 11:42 pm
--
Free online web development tutorials and articles at

http://www.brenkoweb.com/

Re: Link Hovering

by caycebelieves » Thu Jul 23, 2015 4:34 pm

IT WORKED!! Thank you so much! Is there a way to replace that text with an image? I am doing the color for a type of temporary setting, but I want to change it to an image if possible.

brenko.web wrote:At this link you should find everything you need; just scroll down to the example itself:
http://www.brenkoweb.com/tutorials/css/ ... lasses.php

If you want to have #content a:visited { color: purple } it shows something else (let say green), it may be a few things.

For beginning change purple to red and see if it works. Perhaps browser's default color is purple already and you can't see the difference. Red should override it.

If it still doesn't work, that means that some other selector is overriding it. Try to change code to this:

#content a:visited { color: purple !important } and see if it works.

Make sure that you don't have a child element under #content a so it does not override your command.


Tell me if you got it.

Regards
User avatar

caycebelieves

  • Posts: 2
  • Joined: Fri Jul 17, 2015 7:23 pm

Re: Link Hovering

by dheerajojha500 » Mon Oct 26, 2015 8:22 am

It worked for me also. Although lately I found a great way to do it. It's easy also. Anyone interested?
User avatar

dheerajojha500

  • Posts: 8
  • Joined: Mon Oct 26, 2015 8:07 am
  • Location: India
--
Check out our blog for free recharge


+ Post a reply

Page 1 of 1