I am currently using Bootstrap 5 to build a website and I am facing an issue with making the header image responsive on mobile devices. While it looks good on desktop, laptop, and tablet screens, on mobile the text and button are not aligning well as they do on other screen sizes.
Here is how it appears on desktop: https://i.sstatic.net/oVxwp.jpg
And this is how it looks on mobile: https://i.sstatic.net/M3j9i.jpg
:root {
--desktop-min: 1200px;
--laptop-min: 900px;
--laptop-max: calc(var(--desktop-min) - 1px);
--tablet-min: 720px;
--tablet-max: calc(var(--laptop-min) - 1px);
--mobile-min: 300px;
--mobile-max: calc(var(--tablet-min) - 1px);
}
#navbar-color {
background-color: hsl(210, 45%, 30%);
}
.navbar-light .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-light .navbar-toggler {
border: 1px solid hsl(0, 0%, 100%);
outline: none;
box-shadow: none;
}
.carousel-inner img {
width: 100%;
height: 100%;
filter: brightness(0.6);
}
.carousel-caption {
position: absolute;
top: 50%;
transform: translateY(-50%);
}
.carousel-caption h1 {
font-size: 500%;
transform: uppercase;
text-shadow: 1px 1px 15px hsl(0, 0%, 0%);
}
.carousel-caption h4 {
font-size: 200%;
font-weight: 500;
padding-bottom: 1rem;
text-shadow: 1px 1px 10px hsl(0, 0%, 0%);
}
....