C
C
Chokatillo2015-11-08 02:01:59
css
Chokatillo, 2015-11-08 02:01:59

Wordpress heder_menu child button display issue?

cg91812-wordpress-3.tw1.ru
When you hover over the menu, you can see that the child elements "lost" the style, because it happened after adding the search form to the menu, namely after this code:

.menu-header li:last-child{padding:0px 0px;}
.menu-header li:last-child:hover{padding:0px 0px;}
.menu-header li:nth-last-child(2) {margin-right: 53px!important;}
.menu-item-search {position: absolute!important; top: 0; right: 0;}

I'm trying to complete the code in order to assign a style, but to no ...
menu code, where ul is a child element:
.menu-header { position: absolute; text-align:center; right: 53px; font-size: 16px !important; font-size: 1.6rem !important; font-style: oblique;} @media screen and (max-width: 892px){ .menu-header { display: none;}} .menu-header > li { text-transform: uppercase; display: inline-block;} .menu-header li { line-height: 1; margin: 0 !important; position: relative; background: rgba(0, 105, 170, 0.7); padding: 17px 10px; padding: 1.7rem 1rem; -moz-transition: all 300ms; -o-transition: all 300ms; -webkit-transition: all 300ms; transition: all 300ms;} .menu-header li:hover{ background: rgba(0, 105, 170, 1);} .menu-header li:hover ul{ display: block; overflow: inherit; clip: inherit; width: inherit; height: inherit;}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2015-11-10
@serovpochta

Add after the above code:

.menu-header li ul li:nth-last-child(2) {
    margin-right: 0!important;
}
.menu-header li ul li:last-child,.menu-header li ul li:last-child:hover {
    padding: 17px 10px;
    padding: 1.7rem 1rem;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question