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%; }