Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap: Navbar Logo Size

I have a 1700x700 logo and my navbar height is 70. I would like to auto-resize and adapt it to my navbar height. I could resize it to 170x70 with photoshop but the problem is that the image loses quality when I zoom on.

I tried with img-responsive but it doesn't work.

Thank you!

<a class="navbar-brand" href="index.php"></a>



.navbar-brand
{
    position: relative;
    background: url(../images/logo.png);
    width: 170px;
    left: 15px;
}
like image 742
Asez Avatar asked Oct 29 '22 17:10

Asez


1 Answers

You can set following css for this

.navbar-brand {
    position: relative;
    background: url(../images/logo.png);
    width: 170px;
    left: 15px;
    background-size: contain;
}
like image 164
Super User Avatar answered Nov 09 '22 04:11

Super User