delarge
1/26/2015 - 3:59 PM

Relative ratio on elements - pure CSS

Relative ratio on elements - pure CSS

.box{
	position: relative;
	width: 100%;		/* desired width */

  &:before{
	content: "";
	display: block;
	padding-top: 100%; 	/* initial ratio of 1:1*/
  }

}