Make the height of a div same as width

div {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
}