A Pen by Ruben Vincenten on CodePen.
Created
November 5, 2014 09:23
-
-
Save Langmans/7aaf445150c9128af0fc to your computer and use it in GitHub Desktop.
A Pen by Ruben Vincenten.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="quarter"> | |
<div class="square"> | |
<div class="content"> | |
<h1>Lorem ipsum</h1> | |
</div> | |
</div> | |
</div> | |
<div class="quarter"> | |
<div class="square"> | |
<div class="content"> | |
<h1>Lorem ipsum</h1> | |
</div> | |
</div> | |
</div> | |
<div class="quarter"> | |
<div class="square"> | |
<div class="content"> | |
<h1>Lorem ipsum</h1> | |
</div> | |
</div> | |
</div> | |
<div class="quarter"> | |
<div class="square"> | |
<div class="content"> | |
<h1>Lorem ipsum</h1> | |
</div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
box-sizing:border-box; | |
} | |
.quarter { | |
width:24%; | |
margin-right:1%; | |
float:left; | |
background:red; | |
color:white; | |
.square { | |
padding-top:100%; | |
position:relative; | |
overflow:hidden; | |
.content { | |
position:absolute; | |
top:0; | |
left:0; | |
right:0; | |
bottom:0; | |
overflow:auto; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment