Generators · 100% free

CSS Aspect Ratio Generator

Generate CSS aspect-ratio rules for responsive media containers, modern property + fallback.

CSS
Modern (all current browsers)
css
aspect-ratio: 16 / 9;
Legacy fallback (padding hack)
css
.aspect-16-9 {
  position: relative;
}
.aspect-16-9::before {
  content: "";
  display: block;
  padding-bottom: 56.2500%;
}
.aspect-16-9 > * {
  position: absolute;
  inset: 0;
}

About this tool

Modern aspect-ratio CSS for responsive containers. Generator includes legacy padding-bottom hack fallback.

More free tools

See all tools →
Free forever · No card

Why wait? Try it free today.

Stop managing feeds manually. Start optimising with AI in 30 seconds.

  • 100% free forever, no credit card required
  • 1 brand, 1 feed, 100,000 products per feed
  • Full AI Product Optimisation, Rule Engine, and 200+ channel exports
  • Pay only for AI credits when you need them