How To Use CSS To Maintain Aspect Ratio For Responsive Design The padding hack is a simple and effective technique for maintaining the aspect ratio of a div as the window's width changes.