Is there a script that when div resize(browser) it will maintain aspect ratio?
ive tried using css which adjust the width through min-max but wish to maintain the aspect ratio (height)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html, body
{
margin: 0;
padding: 0;
}
body
{
position: relative;
min-height: 900px;
background-color: #C6C6AE;
margin-left: auto;
margin-right: auto;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana;
}
#head
{
height: 10%;
}
#container
{
top: 20px;
left: 0;
right: 0;
min-width: 300px;
max-width: 750px;
height: 500px;
margin-left: auto;
margin-right: auto;
background-color: #F39;
width: auto;
border: thick solid #036;
}
</style>
</head>
<body>
<div id="head"></div>
<div id="container">
</div>
</body>
</html>