javascript - How to setup responsive design for UL elemeet -


i trying work on responsive design bootstrap ul elements.

i have html like:

<div class="col-lg-8 col-md-7 col-sm-4 col-xs-4">     <div class='row'>          <ul>              <li class='item'></li>              <li class='item'></li>              <li class='item'></li>              <li class='item'></li>            </ul>     </div> </div> 

css

.item{     background-color:red; } 

the elements looks fine large width

 ---   ---    ---    --- |   | |   |  |   |  |   |  ---   ---    ---    --- 

but not smaller width

 -- |  |   --    -- |  |   --    -- |  |   --    -- |  |   --   

i want have smaller width li when it's in smaller screen , want li line horizontally. guys can help? much!

ul#my_list{   width:100%; }  #my_list li {    width:300px;    transition:ease-in-out 300ms all;    display:inline-block;    float:left; // dont forget use clearfix or similar method on #my_list element }   @media (max-width:320){    #my_list li{       width:150px;       display:block;    } } 

something should you're looking for, hope able help, if didn't explain or off mark, please feel free let me know!


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -