I created this fiddle (http://jsfiddle.net/HfpHf/1/) based on the following stackoverflow question/answer: https://stackoverflow.com/a/9236397
The relevant bits are:
.box-parent {
width:95%;
padding-bottom:95%;
height:0;
position:relative;
}
.box {
border-radius: 10%;
width:100%;
height:100%;
position:absolute;
left:0;
background-color:rgb(17, 17, 17);
color: #ffffff;
text-align: center;
}
The trouble is I don't really understand how or why it works. More specifically, what does setting height: 0 on the parent do and why does setting padding-bottom to the same percentage as width result in the child being a square?