Hey there! Check out the website I've crafted using bootstrap 4. I'm facing a major problem with the logo, as it remains the same size across all devices.
I attempted to include the img-fluid class, but when added, the logo shrinks so drastically on mobile phones that it appears like a tiny speck. Hence, I removed this class. Currently, on mobile, the hamburger icon has moved to the second line while the first line of the navbar displays the 310 px logo incompletely. I wish to maintain the spacing between the navbar elements as it is now, but suspect the issue may stem from my css:
.navbar .navbar-brand {
padding: 5px 200px;
}
.navbar-nav>li {
padding-left: 5px;
padding-right: 5px;
}
.navbar-nav>li {
margin-left: 5px;
margin-right: 5px;
}
This is how my html looks:
<nav class="navbar navbar-light navbar-expand-xl fixed-top ">
<a class="navbar-brand "> <img src="x" alt="logo" style="width: 310px"></a>
<button class="navbar-toggler" data-target="#collapsingNavbarLg" data-toggle="collapse" type="button">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse" id="collapsingNavbarLg">
<ul class="navbar-nav float-right text-right pr-3">
<li class="nav-item">
<a class="nav-link py-0" href="/" style="font-size: 130%;">Home</a>
</li>
<li class="nav-item">
<a class="nav-link py-0" href="ChiSono" style="font-size:130%;">Chi Sono</a>
</li>
<li class="nav-item">
<a class="nav-link py-0" href="Servizi" style="font-size:130%;">Servizi</a>
</li>
<li class="nav-item">
<a class="nav-link py-0" href="Contattaci" style="font-size:130%;">Contattaci</a>
</li>
<li class="nav-item">
<a class="nav-link py-0" href="AreaClienti" style="font-size:130%;"> Area Clienti</a>
</li>
</ul>
</div>
</nav>
The constant 200px padding and the consistent spacing between li elements seem to be causing these problems. Is there any way to preserve the spacing for my navbar elements even as they resize? Or perhaps another solution to rectify this? Thanks!