Created
May 28, 2015 18:08
-
-
Save gearmobile/ea5107142b7dfd26b491 to your computer and use it in GitHub Desktop.
Block Equal Height
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
HTML: | |
<div class="square"> | |
<span class="square_dummy"></span> | |
<span class="square_element">Content</span> | |
</div> | |
CSS: | |
.square { | |
display: inline-block; | |
position: relative; | |
width: 55%; | |
} | |
.square_dummy { | |
margin-top: 100%; | |
display: block; | |
} | |
.square_element { | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
left: 0; | |
right: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment