Currently working on a landing page project and noticed that my logo appears too small, utilizing Bootstrap 5
style.css
...
.navbar-brand {
width: 3.5rem;
padding: 0 0;
margin: 0.3rem 0;
position: relative;
}
.navbar-brand img {
width: 100%;
height: auto;
}
body .navbar-brand .logo-dark {
display: none;
}
body.dark-layout .navbar-brand .logo-light {
display: none;
}
body.dark-layout .navbar-brand .logo-dark {
display: block;
}
@media (min-width: 576px) {
.navbar-expand-sm .navbar-brand {
width: 4.5rem;
}
.navbar-expand-sm.headroom--not-top:not(.headroom--pinned):not(.headroom--bottom) {
transform: translateY(-100%);
}
.navbar-expand-sm .nav-item {
height: 4.5rem;
display: flex;
align-items: center;
}
.navbar-expand-sm .nav-item:not(:first-child) {
margin-left: 1.25rem;
}
}
@media (min-width: 768px) {
.navbar-expand-md .navbar-brand {
width: 4.5rem;
}
.navbar-expand-md.headroom--not-top:not(.headroom--pinned):not(.headroom--bottom) {
transform: translateY(-100%);
}
.navbar-expand-md .nav-item {
height: 4.5rem;
display: flex;
align-items: center;
}
.navbar-expand-md .nav-item:not(:first-child) {
margin-left: 1.25rem;
}
}
@media (min-width: 992px) {
.navbar-expand-lg .navbar-brand {
width: 4.5rem;
}
.navbar-expand-lg.headroom--not-top:not(.headroom--pinned):not(.headroom--bottom) {
transform: translateY(-100%);
}
.navbar-expand-lg .nav-item {
height: 4.5rem;
display: flex;
align-items: center;
}
.navbar-expand-lg .nav-item:not(:first-child) {
margin-left: 1.25rem;
}
}
@media (min-width: 1200px) {
.navbar-expand-xl .navbar-brand {
width: 4.5rem;
}
.navbar-expand-xl.headroom--not-top:not(.headroom--pinned):not(.headroom--bottom) {
transform: translateY(-100%);
}
.navbar-expand-xl .nav-item {
height: 4.5rem;
display: flex;
align-items: center;
}
.navbar-expand-xl .nav-item:not(:first-child) {
margin-left: 1.25rem;
}
}
@media (min-width: 1400px) {
.navbar-expand-xxl .navbar-brand {
width: 4.5rem;
}
.navbar-expand-xxl.headroom--not-top:not(.headroom--pinned):not(.headroom--bottom) {
transform: translateY(-100%);
}
.navbar-expand-xxl .nav-item {
height: 4.5rem;
display: flex;
align-items: center;
}
.navbar-expand-xxl .nav-item:not(:first-child) {
margin-left: 1.25rem;
}
}
.navbar-expand .navbar-brand {
width: 4.5rem;
}
...
Snippet from my html file
[![...
<body>
<nav class="navbar navbar-expand-lg navbar-transparent navbar-sticky navbar-light">
<div class="container-fluid px-xl-0 mx-xl-5">
<a class="navbar-brand" href="index.html">
<img src="{{ url_for('static', filename='images/logo-no-background.svg') }}" alt="" class="">
</a>
...][1]][1]