Does a sidebar/navbar count towards columns in Bootstrap 3? -
i'm working on bootstrap 3 site , have stupid question. code have (didn't write, cleaning up) has sidebar navigation bar, nested under container, not live within col-div or row. incorrect? layout currently:
<body> <section id="container"> (no class) <header/> <aside> <div id="sidebar" class="nav-collapse"> <ul class="sidebar-menu" id="nav-accordion"> <li class="sub-menu"> ... </aside> <section id="main-content"> <section class="wrapper site-min-height"> <div> <div class="row-fluid"> <div class="col-sm-6 pull-right"> ...content...
well, condense this, see there no class container anywhere in hierarchy... awesome! original question remains, though:
should navigation sidebar exist within col-- div, or next in "content area"? thinking former...
it depends.
if you'll have more 1 row
s tall column (containing sidebar) make first row
high , break design.
if designing 1 row
high put sidebar within col-
.
in both situations though best solution nest grid elements so:
<div class="container"> <div class="row"> <div class="col-md-4"> ...sidebar comes here... </div> <div class="col-md-8"> <div class="row"> nested grid can come here it's own columns. </div> </div> </div> </div>
a great example: http://getbootstrap.com/examples/dashboard/
Comments
Post a Comment