Zaloguj | Zarejestruj | FAQ
Anonymous

Link Hovering

+ Odpowiedz

Posty: 4 Strona 1 z 1


Link Hovering

przez caycebelieves » Pt lip 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;
}
Avatar użytkownika

caycebelieves

  • Posty: 2
  • Dołączył(a): Pt lip 17, 2015 7:23 pm

Re: Link Hovering

przez brenko.web » Wt lip 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

Ostatnio edytowano Wt mar 08, 2016 3:50 pm przez brenko.web, łącznie edytowano 1 raz

Avatar użytkownika

brenko.web

  • Posty: 7
  • Dołączył(a): N lis 25, 2012 11:42 pm
--
Free online web development tutorials and articles at

http://www.brenkoweb.com/

Re: Link Hovering

przez caycebelieves » Cz lip 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 napisał(a):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
Avatar użytkownika

caycebelieves

  • Posty: 2
  • Dołączył(a): Pt lip 17, 2015 7:23 pm

Re: Link Hovering

przez dheerajojha500 » Pn paź 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?
Avatar użytkownika

dheerajojha500

  • Posty: 8
  • Dołączył(a): Pn paź 26, 2015 8:07 am
  • Lokalizacja: India
--
Check out our blog for free recharge


+ Odpowiedz

Strona 1 z 1