Container with image bleeding out while text stays in.

I have a container which max-width so it doesn't stretch too much on big screens. Now I have two columns in which left column is an image and right column is text. I want the image to take all the space available on the left (overflowing the container) and on the right, the text stays in the container (no overflow). How do I achieve this? I have attached screenshot of design for reference.
No description
11 Replies
ἔρως
ἔρως2w ago
you forgot to hide the overflow also, try object-fit: cover
Hyper Khaa
Hyper Khaa2w ago
Actually this is the output I want. How do I achieve this in HTML and CSS. The image I have attached is the replica of the design I have got. @ἔρως
ἔρως
ἔρως2w ago
that's what you want?
Hyper Khaa
Hyper Khaa2w ago
Yes
ἔρως
ἔρως2w ago
in bootstrap?
Hyper Khaa
Hyper Khaa2w ago
Nope Vanilla CSS
ἔρως
ἔρως2w ago
well, do the columns have full width?
Hyper Khaa
Hyper Khaa2w ago
Both the columns have same width but they are in the container which have a max-width
ἔρως
ἔρως2w ago
yeah, good luck with that that won't work you will have to set that to have 100% width - outside the container and then, you have to limit the width of the text inside the container it will be a massive pain to implement
Hyper Khaa
Hyper Khaa2w ago
How can I set the width of the text to match other sections and the header in the design?
ἔρως
ἔρως2w ago
^ there