html - 3 column grid navbar bootstrap -
i trying create 3 column grid navbar, have tried using columns built bootstrap have no success.
the first column needs have max-width of 100px, can fluid if browser re-sized
the second column needs fill gap between 1st , 2nd column , fluid respond if browser re-sized.
the third column needs have max-width of 200px, can fluid if browser re-sized
i unable columns inline each other, heres fiddle: http://jsfiddle.net/xsfvw/7/
<!--bootstrap approach--> <div class="container-fluid"> <div class="row"> <div class="col-xs-8 col-sm-3 border">logo</div> <div class="col-xs-2 col-sm-6 border">nav</div> <div class="col-xs-2 col-sm-3 border">right</div> </div> </div> <!--standard css approach--> <div class="container-fluid"> <div class="row"> <div class="nalogo">logo</div> <div class="nanav">nav</div> <div class="naright">right</div> </div> </div> css:
.border { border: 2px solid #ff0000; z-index: 1020; height: 50px; margin-bottom: 30px; } .nalogo { width:100px; height:50px; background-color:#ff0000; border: 1px solid #000; float: left; } .nanav { width:100%; height:50px; background-color:#00ff00; border: 1px solid #000; margin:0 auto !important; } .naright { display: inline-block; width:200px; height:50px; background-color:#0000ff; border: 1px solid #000; float: right; } here trying replicate:

bootstrap supports hiding , showing grid tiles based on width of screen. consider using visible-*-block way address issue. please consider following fiddle:
it uses following design pattern:
<div class="container-fluid"> <div class="row"> <div class="col-xs-2 visible-xs-block border">nav</div> <div class="col-xs-8 visible-xs-block border">logo xs</div> <div class="col-xs-2 visible-xs-block border">right</div> <div class="col-sm-3 visible-sm-block visible-md-block border">logo sm</div> <div class="col-sm-6 visible-sm-block visible-md-block border">nav </div> <div class="col-sm-3 visible-sm-block visible-md-block border">right</div> </div> </div>
Comments
Post a Comment