Reputation: 11
So, I've got this:
.container_2{
overflow: hidden;
height: 200px;
width: 1900px;
color: white;
background-image: url('https://i.ibb.co/RyxFhXn/aldebaran-s-O-6kqn-Ev-O1s-unsplash.jpg');
}
but the bg-image is not full width, its multiplying itself to cover the width required, rather than covering full div container, without requiring it to multiply.
Upvotes: 0
Views: 20
Reputation: 1550
.container_2{
overflow: hidden;
height: 200px;
width: 1900px;
color: white;
background-image: url('https://i.ibb.co/RyxFhXn/aldebaran-s-O-6kqn-Ev-O1s-unsplash.jpg');
background-size: cover;
background-position: center;
}
<div class="container_2">
</div>
Is that what you need?
Upvotes: 1