Answer the question
In order to leave comments, you need to log in
How to make a logo in Bootstrap be responsive?
I am building a website with responsive design. I am using Bootstrap. There is the following code. The CSS is standard for Bootstrap 3.
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<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="#"><img src="img/logo.png" class="img-responsive" alt="Blockchain"></a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search"></i>
</div>
</form>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Try adding
@media (max-width: 480px) {
.navbar-brand {
float: none;
display: block;
overflow: hidden;
}
}
<div><a class="navbar-brand" href="#"><img src="img/logo.png" class="img-responsive" alt="Blockchain"></a></div>
<a class="navbar-brand" href="#"><img src="img/logo.png" class="img-responsive" alt="Blockchain"></a>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question