Having some trouble with Bootstrap and getting this image to cover the full width of my container. Any ideas?
Appreciate the help!
Here's the code snippet:
Hey everyone,
I've been working on a new project using Bootstrap, but I'm having difficulty making an image cover the entire width of my container. Any suggestions would be greatly appreciated. Here's the CSS code snippet I'm using:
:root {
--DarkerGray: #1b1d1d;
--Gray: #3F4545;
--MediumGray: #464a4a;
--DarkBlue: #123B79;
--LightBlue: #18A5A7;
--LightGray: #D9D9D9;
--LighterGray: #eceaea;
--White: white;
--OrangeSelect: rgb(255, 166, 0);
}
html, body {
user-select: none;
}
.navbar {
background-color: var(--DarkBlue);
}
.nav-item {
cursor: pointer;
font-weight: 550;
}
.dropdown-item {
cursor: pointer;
font-weight: 550;
}
.dropdown-item:hover {
background-color: var(--OrangeSelect);
}
#containerIMG {
width: 100%;
height: 500px;
object-fit: cover;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
<img src="https://t.ctcdn.com.br/essK16aBUDd_65hp5umT3aMn_i8=/400x400/smart/filters:format(webp)/i606944.png" id="containerIMG"></div>