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
ἔρως
ἔρως6mo ago
you forgot to hide the overflow also, try object-fit: cover
Hyper Khaa
Hyper KhaaOP6mo 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. @ἔρως
ἔρως
ἔρως6mo ago
that's what you want?
Hyper Khaa
Hyper KhaaOP6mo ago
Yes
ἔρως
ἔρως6mo ago
in bootstrap?
Hyper Khaa
Hyper KhaaOP6mo ago
Nope Vanilla CSS
ἔρως
ἔρως6mo ago
well, do the columns have full width?
Hyper Khaa
Hyper KhaaOP6mo ago
Both the columns have same width but they are in the container which have a max-width
ἔρως
ἔρως6mo 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 KhaaOP6mo ago
How can I set the width of the text to match other sections and the header in the design?
ἔρως
ἔρως6mo ago
^ there
Want results from more Discord servers?
Add your server