@UserAhmad2001
Posted
Hello Oshane π
If you want to keep the image from scaling down horizontally, you could use the css property object-fit like this :
-
object-fit: contain ;
in this state the top and bttom of the image will remain in place. -
object-fit: cover ;
in this state the right and left of the image will remain in place.
Try it out, If you have any questions, Feel free to ask
Marked as helpful
@Noid3ah
Posted
@UserAhmad2001 i would have to add the image as a background-img correct?. I will give this a try, thanks!
@UserAhmad2001
Posted
@Noid3ah
If you add it as a background-image
, you should use the css property background-size: contain ;
or background-size: cover ;
, the above solution is used with the image elements, to achieve the same result.
Fell free to do it however you like.
GOOD LUCKπ