skip to Main Content

How to maintain aspect ratio using aspect-ratio in a CSS grid on both landscape and portrait layouts

I have the following elements laid out using both Grid and Flexbox: <div class="container"> <div class="inner"> <h2>Title</h2> <div class="square"></div> </div> <div class="inner"> <h2>Title</h2> <div class="square"></div> </div> <div class="inner"> <h2>Title</h2> <div class="square"></div> </div> <div class="inner"> <h2>Title</h2> <div class="square"></div> </div> </div> I…

VIEW QUESTION
Back To Top
Search