css - How to make Bootstrap 'List group' responsive -


i using bootstrap 'list group' , need make responsive. means in mobile view, list show drop down button navbar.

i tried nav classes, not working expected. code:

<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#side-menu-collapse">     <span class="sr-only">toggle navigation</span>     <span class="icon-bar"></span>     <span class="icon-bar"></span>     <span class="icon-bar"></span> </button>     <ul class="list-group collapse navbar-collapse" id="#side-menu-collapse">   <li class="list-group-item dropdown-toggle">cras justo odio</li>   <li class="list-group-item dropdown-toggle">dapibus ac facilisis in</li>   <li class="list-group-item dropdown-toggle">morbi leo risus</li>   <li class="list-group-item dropdown-toggle">porta ac consectetur ac</li>   <li class="list-group-item dropdown-toggle">vestibulum @ eros</li> </ul> 

you can bit of media query. in overiding collapse class when screen size different of xs.

bootply : http://www.bootply.com/120504

css :

@media screen , (min-width: 768px) {  .custom-collapse .collapse{             display:block;       }   } 

html :

<div class="custom-collapse">   <button class="collapse-toggle visible-xs " type="button" data-toggle="collapse" data-parent="custom-collapse" data-target="#side-menu-collapse">       <span class="">toggle navigation</span>       <span class="icon-bar"></span>       <span class="icon-bar"></span>       <span class="icon-bar"></span>   </button>    <ul class="list-group collapse" id="side-menu-collapse">     <li class="list-group-item dropdown-toggle">cras justo odio</li>     <li class="list-group-item dropdown-toggle">dapibus ac facilisis in</li>     <li class="list-group-item dropdown-toggle">morbi leo risus</li>     <li class="list-group-item dropdown-toggle">porta ac consectetur ac</li>     <li class="list-group-item dropdown-toggle">vestibulum @ eros</li>   </ul> </div> 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -