Answer the question
In order to leave comments, you need to log in
How to remove padding for an image placed in a navigation bar button (bootstrap)?
It is necessary to make the button have an image that occupies the entire height of this button, but bootstrap indents for it, how to remove them?
Here is the html and css:
<nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
<section class="container">
<div class="btn-group navbar-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<img src="/img/0.jpg" alt="..." class="img-responsive img-logo">
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Действие</a></li>
<li><a href="#">Другое действие</a></li>
<li><a href="#">Что-то иное</a></li>
<li class="divider"></li>
<li><a href="#">Отдельная ссылка</a></li>
</ul>
</div>
</section><!-- /.container -->
</nav>
<!-- /navigation -->
.img-logo {
border: 2px solid black;
border-radius: 4px;
height: 100px;
padding: 0;
margin: 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question