jp19 0

Hello,

I have set background image for a div. I tried background-size: 100% / cover / contain ... but none of them achieve what I want - which is that if div is large, then background image should scale down and be shown fully.

  • I'm not sure I understand what you're going for? Are you looking for it to be the size of the element, unless the element is larger, in which case it should be the image size? Ktash 5 months ago

2 answers

danwellman 5525
0
points
This was chosen as the best answer

Is this what you need?

Answered 4 months ago by danwellman
0
points

This one I like as it's nice and easy. Here it is.

Answered 4 months ago by sbl2000
Log in to post your answer