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
croganm16mo ago
Hello, do you have an example?
briancross
briancross16mo ago
Yep, gotta see the code. Code pen or GitHub pages or something.
snxxwyy
snxxwyy16mo ago
@s2k_off try using an aspect-ratio.
!ThatGuy
!ThatGuy16mo ago
You could achieve this by setting the width of the image to a percentage or vw (view width).
Want results from more Discord servers?
Add your server