Jump to content

CSS Problem

MartinIAm
Go to solution Solved by Zuccers,

Might find what you are looking for here:

https://www.w3schools.com/css/css_rwd_images.asp

 

Something like this:

Picture {
  width: 100%;
  height: 400px;
  background-image: /*Image source*/

}

I have an app where it displays the user's avatar but instead of cropping it, it stretches the image to fit inside the 400px by 400px image. How can I fix this so it doesn't stretch it but instead centers the image to use a 1920x1080 image that is cropped to 400x400

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×