Answer the question
In order to leave comments, you need to log in
Is it possible to automatically adjust the height of the block to the height of the background image?
Good day, I ran into a problem, I can't solve it for two days now...
Is there any way to adjust the height of the block to the height of the image specified as 'background-image' ?
Without using the height property
Answer the question
In order to leave comments, you need to log in
In your case, it's easier to do the opposite. You have a rubber block, as I understand it, therefore, in addition to background-image, you need to add another property . So the picture itself will expand under the block. background-size:cover;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question