[Solved] Bootstrap Navbar not displaying correctly on Mobile and Tablet

Last Reply 13 days ago By dharmendr

Posted 16 days ago

Dear friend!

I build bootstrap navbar menu by article

Bootstrap Responsive ASP.Net Menu control for Mobile Phone, Tablet and Desktop display

AND help of Mr. dharmendr (Populate N-Level Bootstrap Responsive Menu using DataTable in ASP.Net).

It display good on pc, laptop and mobile-Vertical, but don't display good on Mobile-horizontal and Tablet (it display same as on pc and laptop).

I googed but not resuilt.

Can anybody can help me.

Posted 13 days ago

Hi test0101,

Add the below css and check.

CSS

@media (max-width: 992px) {
    .navbar-header {
        float: none;
    }
    .navbar-left,.navbar-right {
        float: none !important;
    }
    .navbar-toggle {
        display: block;
    }
    .navbar-collapse {
        border-top: 1px solid transparent;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
    }
    .navbar-fixed-top {
        top: 0;
        border-width: 0 0 1px;
    }
    .navbar-collapse.collapse {
        display: none!important;
    }
    .navbar-nav {
        float: none!important;
        margin-top: 7.5px;
    }
    .navbar-nav>li {
        float: none;
    }
    .navbar-nav>li>a {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .collapse.in{
        display:block !important;
    }
}