html - Get an element of navbar to center -
i have navbar below. how center element help video
.
.header_title{ font-size: 20px; color: white; } .center { text-align:center; } .center { float:none; display:inline-block; *display:inline; /* ie7 fix */ *zoom:1; /* haslayout ie7 trigger */ vertical-align: top; }
<div class="navbar navbar-default navbar-fixed-top navbar_form" role="navigation"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">toggle navigation</span> </button> <a class="navbar-brand" href="/"><font class="header_title" >some text</font></a> </div> <!-- fixed navbar want center this.--> <div class="navbar-collapse collapse center"> <a class="navbar-brand" href="#"><font class="header_title" >help video</font></a> </div> </div><!--/.nav-collapse -->
but not coming center. doing wrong?
remove below styles stylesheet.
.center { float:none; display:inline-block; *display:inline; /* ie7 fix */ *zoom:1; /* haslayout ie7 trigger */ vertical-align: top; }
Comments
Post a Comment