html - Bootstrap alignment - nav header alignment -
i trying achieve this:
however, because have image, left aligned, , 2 lines next image (one h1 , 1 h2), battling 'brand' box inside nav bar. seems have lot of padding , strange stuff going on.
this nav bar code:
<div class="navbar navbar-inverse navbar-custom shadow_bottom navbar-fixed-top" role="navigation"> <div class="container"> <!-- brand , toggle grouped better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#small-navbar-button"> <span class="sr-only">toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <div class="header"> <a class="navbar-brand" href="#"> <img src="~/images/logo.png" alt="accufinance - home budget site" /> </a> <a class="navbar-brand" href="#"> <h1>accufinance</h1> <h2>home finance - simplifying budgeting</h2> </a> </div> </div> <!-- collect nav links, forms, , other content toggling --> <div class="collapse navbar-collapse" id="small-navbar-button" style="padding-right: 25px"> <ul class="nav navbar-nav pull-right"> <li class="active"><a href="/"><span class="glyphicon glyphicon-home"></span> home</a></li>
...
this issue around class="header" area. have created css try , position items correctly:
.header img { float: left; margin: 2px; top: 5px; padding: 0; } .header h1 { position: relative; top: 5px; bottom: 2px; left: 2px; }
but can't seem correctly align 2 headers next image, within navbar area.
bootply version: http://www.bootply.com/oztmfyghx7
the issue seems branding block (with image , text) seems have large padding @ top. image should right against top of screen.
if customize bootstrap:
http://getbootstrap.com/customize/
change @navbar-height around 75px. should you.
by default bootstrap limits height 50px. brand images taller overflow content below.
Comments
Post a Comment