CSS: How to make DIV height same as WIDTH?
Div height can be made same as its width easily.
div {
width: 100px;
height: 0px;
padding-bottom: 100px;
}
OR (Percentage will also work)
div {
width: 50%;
height: 0px;
padding-bottom: 50%;
}
Works in all modern browsers.…