Home / CSS Tips Generated By ChatGPT / Aspect Ratio Boxes in CSS Create boxes that maintain an aspect ratio, useful for responsive designs. Source Code .aspect-ratio-box { width: 100%; height: 0; padding-top: 56.25%; /* 16:9 Aspect Ratio */ position: relative; }