Question regarding images in css

Hello everyone, how do I make an image wider but smaller height (shorter), in my design that I am working on the image is normal on mobile sizes and wider on tablet sizes
4 Replies
croganm
croganm11mo ago
Hello, do you have an example?
briancross
briancross11mo ago
Yep, gotta see the code. Code pen or GitHub pages or something.
snxxwyy
snxxwyy11mo ago
@s2k_off try using an aspect-ratio.
ThatGuy
ThatGuy11mo ago
You could achieve this by setting the width of the image to a percentage or vw (view width).