

::Edit 2:: just using jQuery to handle set width of div based on height.
Everything I've found so far (mostly the padding trick) uses the parent element's width to maintain aspect, and adds a lot of extra space below the div, especially in full screen on large displays. CSS resize Property Here, the user can resize both the height and width of aThe important part is that the div height should be as the browser window height (without scrolling and without hiding overflow), and the width percentages should adjust to keep the aspect ratio correct. The size can be calculated from pixels to em using this formula: pixels /16 em. The default text size in browsers is 16px. To resize backgrounds, specify the width first and then the height.

Keep in mind that manually setting values also changes the aspect ratio. Have been searching for a few days for a CSS only solution to maintaining aspect ratio of a div. To allow users to resize the text (in the browser menu), many developers use em instead of pixels. Similar to resizing with standard images, absolute resizing changes the background dimensions to match the height and width you specify.
