Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Konrad Pilch
2,435 PointsBootstrap and its..
HI,
How can I change bootstrap navbar so on desktop it will have like 39px height without affecting its mobile with the same line-height in on desktop and mobile?
Whenever i change it from 50px to 39px, all messed up. I tried to downolad the bootstrap custome with 39px, still the same.
Thats my code but well:
<section class="bottom-header">
<div class="navbar-sm">
<div class="navbar-primary">
<nav class="navbar navbar-inverse">
<div class="container">
<!-- Mobile and Brand Name -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"></a>
</div><!-- navbar-header -->
<!-- main Navigation -->
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="index.php"><span class="glyphicon glyphicon-home"></span></a></li>
<li><a href="">About Us</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Services <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="">Business Consulting</a></li>
<li><a href="">Accontancy Service</a></li>
<li><a href="">Tax Consulting</a></li>
<li><a href="">Payroll & HMRC RTI Service</a></li>
<li><a href="">Legal Advise</a></li>
<li><a href="">Notary Public</a></li>
<li><a href="">Will Writing</a></li>
<li><a href="">Transfer</a></li>
</ul>
</li><!-- dropdown -->
<li><a href="contact.php">Contact Us</a></li>
</ul>
<div class="search-bar input-group pull-right" id="search-bar">
<input type="text" class="form-control" placeholder="Search" name="srch-term" id="srch-term">
<div class="input-group-btn form-group">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div>
</div><!--/navbar-collapse -->
</div><!-- /container -->
</nav><!-- /main-navbar-->
</div>
</div>
</section><!-- /bottom-header -->
Konrad Pilch
2,435 PointsWell, i believe yes. When i change it to 39px, what i get is that the navbar is not properly set , as well as line-height etc.. on mobile.
Tiffany McAllister
25,806 PointsTiffany McAllister
25,806 PointsSo you want to have a navbar height of 39px for both mobile and desktop? Is that correct?