- This topic is empty.
-
AuthorPosts
-
August 5, 2015 at 1:17 am #206090
JureR
ParticipantHi. I am having problems using hover color on a submenu in WordPress theme.
.et_nav_text_color_light #top-menu li li a – this will change color, but if I use:
.et_nav_text_color_light #top-menu li li a:hover – this will not work.
Any suggestions?
Thank you,
Jure R.August 5, 2015 at 2:02 am #206092Paulie_D
MemberDo you have a link?
August 5, 2015 at 2:18 am #206093JureR
Participanthttp://vrtecvodmat2.splet.arnes.si/ – I know, website is awful, but this is what they want. They want it to look like a website they used in 1995. Their old website -> http://www.vrtecvodmat.si/
Sub menu on left will not display other color on hover.
Thank you for a fast reply,
JureAugust 5, 2015 at 3:26 am #206096Paulie_D
MemberIt’s because of this:
.et_nav_text_color_light .nav ul li a:hover, .et_nav_text_color_light .et_mobile_menu li a:hover { color: #fff !important; }
I’d suggest you remove the
!important
from that. Then your styles should take effect.BTW…just using the developer tools that come with your browser to inspect the element in the various states would have helped you here…I’d recommend getting to grips with them, you could have saved a lot of time.
August 5, 2015 at 3:31 am #206097JureR
ParticipantOh I forgot to mention that I can not access any WP files, I can only add CSS via WordPress theme. I am working for some national/government hosting provider who only works with schools and organisations and they do not allow any custom code/plugins/.. to be added. Been using inspector a lot before, but I must have missed !importnant. Adding !important to my css should probably work too?
Thank you,
JureAugust 5, 2015 at 3:39 am #206098Paulie_D
MemberAdding !important to my css should probably work too?
Weeellll, yes…but you’re getting into dangerous territory using
important
to override another one, I can’t recommend it but if it gets you out of a hole.August 6, 2015 at 8:15 am #206174Geoff Graham
ParticipantHey Jure!
Man, that’s super crummy you don’t have access to code files. Are you able to use the WordPress code editor (Appearance > Editor) to remove the
!important
declaration? Hopefully you have the admin rights to the site to at least access the code from there.
@Paulie_D is absolutely right. I’d also caution that!important
will only work in this case if the element you’re adding it to is in the proper order of the cascade. Otherwise, the current element will continue to supersede it. -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.