R
R
Roman2016-08-03 15:19:29
css
Roman, 2016-08-03 15:19:29

How to style a dropdown menu so that it only pops up on hover where there are inner buttons?

Please tell me how to make a dropout with :hover only for those points where there are internal points of the site
Great ATP.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Goryachkin, 2016-08-03
@Viruz

It's just pichal! You look at your css, all the troubles are because of this line:

.main-nav:hover .sub-menu {
    visibility: visible;
    opacity: 1;
}

Just here it is written that the submenu appears when hovering over the entire block. You need to remove this rule and put it like this:
.menu-item:hover .sub-menu {
    visibility: visible;
    opacity: 1;
}

And you will be happy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question