michaelwilhelmsen
6/2/2014 - 3:06 PM

Create perfect squares with css. Second solution uses viewport, but is only supported with IE9+

Create perfect squares with css. Second solution uses viewport, but is only supported with IE9+

#square {
  height: 100vh;
  width: 100vh;
}
#square {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
}