Skip to main content
Main Content

Cover styling not working

Cover styling not working
Posted 2022-04-09 09:11:17 (edited)
Hi! I'm trying to figure out why the following code won't work. What I want is for the background image to cover the whole section in between the white border (it does on mobile, but not desktop), but no matter what I do it doesn't stretch all of the way to the edges. I'm aware that I should be using "cover", but it doesn't change anything when I do.

This is what the div looks like:

Text Goes Here
More Text goes here
Even More Text goes here

And this is what the code looks like:



Yellow = bootstrap classes (container covers width of post, has padding, and the edges are rounded)
Cyan = Background styling (Image URL, covers the whole div, centers the image, doesn't repeat)
Orange = Border styling (5px wide & white)

I'd really appreciate any help as any time I've tried to google it I just get the answers to different questions. It seems like there should be an easy answer, but for the life of me I can't figure out what. Thanks!

Embers
#3501

Search Topic