0

I am trying to increase bootstrap 3.0 navbar height which is used with fixed top behavior.

How can I do it?

Yehor Smoliakov
  • 326
  • 3
  • 13
Fernando
  • 391
  • 1
  • 8
  • 26
  • Possible duplicate of [Bootstrap 3 - Height of the NavBar](http://stackoverflow.com/questions/20651237/bootstrap-3-height-of-the-navbar) – Ali Gajani Nov 24 '16 at 18:08

2 Answers2

0

If you are using the .less or .scss version, you can edit the following $navbar-height variable in code:

https://github.com/twbs/bootstrap/blob/master/less/variables.less#L360

If not, you need to override it with a rule by statiing:

.navbar {
    height: {new height};
}
Yehor Smoliakov
  • 326
  • 3
  • 13
Eric N
  • 2,136
  • 13
  • 13
0

Without seeing your code it is hard to help but in Bootstrap 3 typically,

This is the less variable @navber-height and @navbar-padding-vertical will adjust the height of the navbar.

But in my current Bootstrap app I have it set up different using

header.navbar {
    height: 54px;
}

The easiest thing to do would be to inspect element on the navigation bar then look at the css to see where the height value is. Adjust it to the desired height.

Then create a rule in your css with !important to override the existing Bootstrap css.

This is another example without less.

.navbar-fixed-top {
    height: 70px !important; /* Whatever you want. */
}

Create new css file and put your overrides in it.

<link rel='stylesheet' href='/stylesheets/bootstrap.css'/>
<link rel='stylesheet' href='/stylesheets/overrides.css'/>

inside overrides.css

If this css rule exists inside Bootstrap when you inspect element then override it in the overrides css file you have added now.

remember use !important

.navbar-fixed-top {
    height: 70px !important; /* Whatever you want. */
}
wuno
  • 9,547
  • 19
  • 96
  • 180
  • witch css file should I edit in My Bootstrap css folder? – Fernando Nov 24 '16 at 18:17
  • I create a new css file. The put it below the bootstrap css file in the head of your document. That way anything you override is sure to stick! I updated my answer to show you what I meen. If this helps you please accept. If not please let me know why and I will try and help more. – wuno Nov 24 '16 at 18:19
  • @wunu I did not clear about your comment. but did you mean should I change bootstrap.css file .navbar-fixed-top? – Fernando Nov 25 '16 at 13:28