Friday, 30 March 2018

Disable hover in mobile view - bootstrap

Disable navbar hover dropdown in small screen

To disable navbar menu hover dropdown in mobile view and dropdown works when user clicks on the navbar menu, write below code in the  .css file.

@media (min-width: 767px) 
{
    ul.nav li.dropdown:hover > ul.dropdown-menu 
    {
       display: block;
    }
}

Above code ul.nav li.dropdown:hover > ul.dropdown-menu works only when the screen size of the user is 767px and more. if your screen greater than and equal to 767px the navbar menu dropdown works on the hover, else  the navbar menu bar works with the default behavior written in Bootstrap.



No comments:

Post a Comment

Featured post

The Lord Of The Rings book pdf

Here you can find The Lord Of The Rings book pdf shared files, Just click on bottom Download link Part 1: The Fellowship of the Ring  Part 2...

Popular Posts