Topic Resolution: Resolved
  • Creator
    Topic
  • #17981

    Frank Stellmacher
    Spectator
    Been thanked: 0 times

    Hi, to change the background color of selected item and hover of the main menu, I use this code, which works fine, when I insert it in theme option –> Custom css:

    ul.nav-menu li.current-menu-item:before, ul.nav-menu li.current-menu-ancestor:before,ul.nav-menu li.current-menu-ancestor li.current-menu-item a, ul.nav-menu li.current-menu-ancestor li.current-menu-parent a,ul.nav-menu li.current-menu-item, ul.nav-menu li.current-menu-ancestor, ul.nav-menu li:hover {background:grey!important;}

    Since I included all my css changes in the style.css of my child theme, I inserted the code in there, but it does not work. It seems, that the mark !important does not work in this case, but however… any hints are welcome.

    Thank you, Frank

Viewing 4 replies - 1 through 4 (of 4 total)
Replies
  • Denzel Chia
    Moderator
    Post count: 3230
    Been thanked: 129 times
    #17987 |

    Hi,

    I cannot be sure what happened. I think it has to do with the loading sequence of the css files.
    I will need to take a look.

    Please kindly provide the following details via private reply.

    WordPress Login Url:
    Username:
    Password:

    Ftp Server Url:
    Port:
    Username:
    Password:

    (Note: To make a private reply -> Click on the “Set as private reply” check box found at lower left corner of this forum’s text box before clicking on Submit button. This will ensure that your reply is visible only to Moderator and Keymaster)

    Thanks!
    Denzel

    Frank Stellmacher
    Spectator
    Post count: 18
    Been thanked: 0 times
    #17994 |
    This reply has been marked as private.
    Denzel Chia
    Moderator
    Post count: 3230
    Been thanked: 129 times
    #18009 |

    Hi,

    There is a line of code in custom-css.php at line 492, which is overwriting your css in child theme’s style.css
    This line of code has the !important mark.
    The custom-css.php is loaded after style.css, so there is no way to overwrite it unless we use a function in child theme.

    I added the following codes in your child theme’s functions.php

    This will print the above style code after custom-css.php and in HTML head.
    This is the only way to keep this style code working in child theme.

    Please see screenshot, your menu is working properly now. http://prntscr.com/7f8p99

    As for your additional issues.

    I do not understand issue 1.

    For issue 2, I found a plugin called TemplatesNext ToolKit in your plugins folder.
    I go into it templatesnext-toolkit -> inc -> widgets -> widget-image.php line 77, found the following codes.

    $output .= '<a href="'.$image_1_url.'" target="_blank">';

    Change to the following.

    $output .= '<a href="'.$image_1_url.'" target="_self">';

    Please note that your additional issues are not part of our product and I am doing it out of goodwill.
    Sorry, I cannot be providing anymore support for issues not related to our products.

    Thanks!
    Denzel

    Frank Stellmacher
    Spectator
    Post count: 18
    Been thanked: 0 times
    #18016 |

    Thank you Denzel, problem is solved. Regards, Frank

Viewing 4 replies - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.