简体   繁体   中英

BootStrap resize navBar height

In this sample of bootstrap navbar-default , I can not resize height of that.This height is big . How to resize that with bootstrap class's ?

for example:

<form class="navbar-form navbar-left" role="search">
  <div class="form-group">
    <input type="text" class="form-control" placeholder="Search">
  </div>
  <button type="submit" class="btn btn-default">Submit</button>
</form>

The default css for the class form-control that bootstrap has is there is height and a padding so I suggest overwrite that with your preferred height. Give textbox and button a class you want like.

.someclass { 
   height: auto !important;
   padding: 5px; //manipulate this
}

or

.someclass { 
   height: 20px !important; //manipulate this
}

See example here

Hope it helps.

Are you placing the same in or tag . These directly pick up the attributes along with the usage of variopus classes . For example try this one -

<header class="navbar navbar-inverse navbar-fixed-top bs-docs-nav" role="banner">
<form  class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form> </header> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM