Created
January 10, 2013 00:09
-
-
Save MichaelArestad/4498211 to your computer and use it in GitHub Desktop.
Line-height vs padding
This file contains hidden or 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
/** Line-height vs padding */ | |
html {background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%;} | |
.no-line-height, | |
.line-height { | |
font-size: 30px; | |
width: 300px; | |
margin: 30px auto; | |
background: white; | |
padding: 10px; | |
} | |
.no-line-height { | |
padding: 50px 10px; | |
} | |
.line-height { | |
height: 100px; | |
line-height: 100px; | |
} |
This file contains hidden or 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
<h1 class="no-line-height">This is NOT formatted with the line-height method.</h1> | |
<h1 class="line-height">This is formatted with the line-height method.</h1> |
This file contains hidden or 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
// alert('Hello world!'); |
This file contains hidden or 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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment