Ugly Hedgehog - Photography Forum
Home Active Topics Newest Pictures Search Login Register
General Chit-Chat (non-photography talk)
Need CSS help. A problem with hover color...
Page 1 of 3 next> last>>
Jun 4, 2019 13:36:58   #
Longshadow Loc: Audubon, PA, United States
 
Is anyone well versed in CSS can give me a hand figuring out why I cannot get a hover color set on a link?

This isn't working in the application:

<style>A:hover { color:red}</style>

Reply
Jun 4, 2019 14:07:53   #
Anhanga Brasil Loc: Cabo Frio - Brazil
 
There is a space in "{ color:red}".

Reply
Jun 4, 2019 14:16:12   #
Longshadow Loc: Audubon, PA, United States
 
Anhanga Brasil wrote:
There is a space in "{ color:red}".

I thought they were space insensitive.?

EDIT: Nope, not the problem...

Reply
 
 
Jun 4, 2019 14:30:34   #
Anhanga Brasil Loc: Cabo Frio - Brazil
 
Longshadow wrote:
I thought they were space insensitive.?

EDIT: Nope, not the problem...


Wait... it is case-sensitive. Try changing "A" to "a".

Reply
Jun 4, 2019 15:08:21   #
juan_uy Loc: Uruguay
 
Long time since I did any CSS, but try this:
<style>a:hover {color:red;}</style>

Reply
Jun 4, 2019 15:58:47   #
Longshadow Loc: Audubon, PA, United States
 
juan_uy wrote:
Long time since I did any CSS, but try this:
<style>a:hover {color:red;}</style>


I have the statement with the capital working at another site.
This one uses CSS for a side pop-out menu.
I'm suspecting the other CSS is having an affect.
Thanks for trying.

Reply
Jun 5, 2019 09:49:42   #
juan_uy Loc: Uruguay
 
Longshadow wrote:
I have the statement with the capital working at another site.
This one uses CSS for a side pop-out menu.
I'm suspecting the other CSS is having an affect.
Thanks for trying.


My change is not the lower-case a (that's just what I used to do), but I added a ";" that I understand was missing.

Reply
 
 
Jun 5, 2019 11:07:15   #
Longshadow Loc: Audubon, PA, United States
 
juan_uy wrote:
My change is not the lower-case a (that's just what I used to do), but I added a ";" that I understand was missing.

The ; is right after red, within the braces.

Reply
Jun 5, 2019 11:27:35   #
juan_uy Loc: Uruguay
 
Longshadow wrote:
The ; is right after red, within the braces.


Yes, it was what I added. It wasn't present in the code you pasted.
Hope that makes it.

Reply
Jun 5, 2019 12:24:42   #
edrobinsonjr Loc: Boise, Idaho
 
This works for me:
<style>
a:hover{color:red;}
</style>

Works with or without the ; or space before red...

Reply
Jun 5, 2019 16:05:31   #
Longshadow Loc: Audubon, PA, United States
 
I'm confused, but I think it may be an odd interaction with the CSS code I'm using for the "MENU". I would like the green "MENU" to change to red upon mouse-over (hover).
The statement <style>A:hover { color:red}</style> works great in other sites that do NOT used the menu code used here, and here unrelated to the menu code (someplace else on the page). I use PHP includes to get some of the contents the same across all pages so I only have to edit one page for the changes to be across all pages.
You should be able to view the page source at the site and see ALL of the included code pulled into the page.
No real biggie as the site works fine, just one of those WTF moment things.....
Thanks to anyone who wants to try to figure it out!
(I wonder if I tries using W3Schools on-line "try-it" editor if I can play with it there.)

https://cvrhs.com/

Reply
 
 
Jun 5, 2019 17:05:18   #
edrobinsonjr Loc: Boise, Idaho
 
I have looked at your page and it's source. The menu items change to red when they are moused over. I use Chrome. What browser are you using?

I tried edge and opera as well and they work OK...

Ed

Reply
Jun 5, 2019 17:15:32   #
Longshadow Loc: Audubon, PA, United States
 
edrobinsonjr wrote:
I have looked at your page and it's source. The menu items change to red when they are moused over. I use Chrome. What browser are you using?

I tried edge and opera as well and they work OK...

Ed


The menu list items do change, I'm trying to get the menu link in the center of the page that opens the menu to change to red on hover. It remains green.
(I'm using Firefox.)

Reply
Jun 5, 2019 17:22:39   #
Longshadow Loc: Audubon, PA, United States
 
I've tried placing the <style>A:hover { color:red}</style> in various places within the body (top), and the menu code area, still remains green.
Just like to know what I'm missing!

Reply
Jun 5, 2019 18:18:22   #
edrobinsonjr Loc: Boise, Idaho
 
Will try to deal with that now that I understand...

Reply
Page 1 of 3 next> last>>
If you want to reply, then register here. Registration is free and your account is created instantly, so you can post right away.
General Chit-Chat (non-photography talk)
UglyHedgehog.com - Forum
Copyright 2011-2024 Ugly Hedgehog, Inc.