• I use a child theme from GeneratePress. Now I want to remove a css statement, which stands in the style.min.css of the main theme.

    .main-navigation .main-nav ul li.menu-item-has-children> a {
    /* padding-right: 0; */
    position: relative;
    }

    I can remove it in style.min.css of the main theme. But with the next update the instruction is surely again there. How can I make this update secure? I can not switch off any instruction from the main theme in child-theme, right?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Tom

    (@edge22)

    You can just add some custom CSS to your child theme, which will overwrite the CSS in the parent theme.

    For example:

    .main-navigation .main-nav ul li.menu-item-has-children > a {
        padding-right: 20px;
    }

    Let me know if you need more info ??

    Thread Starter marwo

    (@marwo)

    Thank you for the fast answer. Yes, that is also a solution. But I wanted to keep the value flexible because I do not know how many pixels are automatically taken when I delete the statement “padding-right: 0;”
    The distance is just right at the moment when I delete this instruction ;-(
    Where do I see what value the template takes when I delete the padding-right-statement?

    Theme Author Tom

    (@edge22)

    By default it’s 20px.

    The padding is removed to make room for the dropdown arrow, which adds that 20px for you.

    However, if you remove the dropdown arrow, then that 20px needs to be re-added to the menu item.

    Thread Starter marwo

    (@marwo)

    Now I have understood and recognized the real problem. With me no dropdown arrow appears. But why not?
    This is my website:
    https://betreuungsverein-prenzlau.de

    In the original GeneratePress layout:
    <li class = "menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-1376" id = "menu-item-1376"> <a href = "#"> Sidebar Layouts <span class = "dropdown-menu-toggle" role = "presentation"> </ span> </a> <ul class = "sub-menu">...
    But in my navigation, the menu items with submenus (“Betreuung & Beratung”, “Kontakt”) are missing this statement: <span class = "dropdown-menu-toggle" role = "presentation"> </ span>

    What can I do?

    Theme Author Tom

    (@edge22)

    That’s very strange. Any custom functions added to the site? If not, can you try deactivating your plugins one by one to see if the issue is within one of them?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How can I remove a css statement update secure’ is closed to new replies.