登录 | 注册 | FAQ
Anonymous

Link Hovering

+ 发表回复

4 篇帖子 分页: 1 / 1


Link Hovering

caycebelieves » 周五 7月 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;
}
头像

caycebelieves

  • 帖子: 2
  • 注册: 周五 7月 17, 2015 7:23 pm

Re: Link Hovering

brenko.web » 周二 7月 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

最后由 brenko.web 编辑于 周二 3月 08, 2016 3:50 pm,总共编辑了 1 次

头像

brenko.web

  • 帖子: 7
  • 注册: 周日 11月 25, 2012 11:42 pm
--
Free online web development tutorials and articles at

http://www.brenkoweb.com/

Re: Link Hovering

caycebelieves » 周四 7月 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 写道: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
头像

caycebelieves

  • 帖子: 2
  • 注册: 周五 7月 17, 2015 7:23 pm

Re: Link Hovering

dheerajojha500 » 周一 10月 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?
头像

dheerajojha500

  • 帖子: 8
  • 注册: 周一 10月 26, 2015 8:07 am
  • 地址: India
--
Check out our blog for free recharge


+ 发表回复

分页: 1 / 1