Background image position
I have a background image whose size is larger than container i want to fit the background image in the container so that the image shoud not be stretched or cut . I am trying to use background position by giving values in percentage but that is not helping what should i do
3 Replies
@.talhamustafa on your container you would do-
The
background-size: cover;
property allows the image to fit in the container without stretching. You can then use background-position
to see the parts of the image you need to.I am doing exactly same but some parts of image is showing
share your code then, otherwise people are just guessing in the dark. Something like codepen would be best, or hosted on something like github pages #how-to-ask-good-questions