Media queries aspect-ratio

Hi I’m battling with media queries and trying to keep them to a minimum.
My question is why isn’t aspect-ratio used to define different screen sizes. Seems to me that there are fewer aspect-ratios than screen sizes and the aspect-ratio effects the screen layout rather than the screen width.
Are my observations wrong? Or is there a reason aspect-ratio is not used in media queries

Thanks for any help

It’s usually just the width that matters since if your content is too wide you end up with horizontal scroll bars - which is what we’re trying to avoid.

1 Like

That would make no sense as there is no aspect ratio that fits all devices. What aspect ratio is my browser if I have it half open or fully open or any pixel in between my 2500px resolution.

The width available for your design is the only thing that needs concern you and that is dictated by your design.

Forget about devices and concentrate on the needs of the design and adjust your design at the width it needs to change. A good responsive design will need fewer media queries than something badly built and rigid. There is a skill to it but the basics are pretty simple. :slight_smile:

3 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.