Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Hover effect on a

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #206090
    JureR
    Participant

    Hi. 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.

    #206092
    Paulie_D
    Member

    Do you have a link?

    #206093
    JureR
    Participant

    http://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,
    Jure

    #206096
    Paulie_D
    Member

    It’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.

    #206097
    JureR
    Participant

    Oh 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,
    Jure

    #206098
    Paulie_D
    Member

    Adding !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.

    #206174
    Geoff Graham
    Participant

    Hey 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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.