To change the proportions of the items all you need to do is change the proportions of the width
and padding-bottom
on the .item
. Changing the width
would affect the number of items on each row, so as to not affect the grid structure we can for example change padding-bottom
to 18%
to create 16:9 (equivalent to 32:18) rectangles.
demo
- HTML, CSS
- Includes: index.html and CSS file