html - Possible to convert container/row to container-fluid/row-fluid at viewport breakpoint? -


for purpose of learning bootstrap, i'm copying http://www.newsweek.com/ (using vanilla bootstrap possible) , top bar (sign in, register, etc.) has me stymied. large viewport, appears simple container/row, resizes , gets medium viewport, instead of breaking seems transition container-fluid/row-fluid.

i set tester in codepen every possible combination of containers , rows fluid , responsive independent , codependent (that i'm aware of) figure out going on , experiment bit:

http://codepen.io/spectre6000/full/vozebb/

at 1200px viewport width (as indicated below rulers),

<div class="container">   <div class="row">     ...   </div> </div> 

and

<div class="container-fluid">   <div class="row-fluid">     ...   </div> </div> 

...are identical. seems newsweek site doing, can't find way myself without coding bar twice different visibility.

how switch 1 container/row setup other @ breakpoint?

add media query! use container class, (assuming container has id #mycontainer):

@media (max-width: 1200px) {     #mycontainer {         width: 97.5%; /*this gives precise width match bootstrap defaults*/     } } 

the width attribute pretty real difference between container , container-fluid, makes container emulate container-fluid.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -