Created
April 14, 2012 00:44
-
-
Save cleitonfco/2381205 to your computer and use it in GitHub Desktop.
Box Sizing
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 | |
*/ | |
body { | |
background: #fff; | |
font: 19px/1.3 "Helvetica Neue", sans-serif; | |
} | |
p { | |
display:block; | |
margin:20px; | |
width: 280px; | |
padding:20px; | |
background-color:#f0f0f0; | |
position:relative; | |
} | |
#border { | |
box-sizing:border-box; | |
} | |
#content { | |
box-sizing:content-box; | |
} | |
#border:before, #content:before { | |
content:"border"; | |
position:absolute; | |
top:0; | |
left:0; | |
padding:5px; | |
font-size:14px; | |
color:#fff; | |
background-color:rgba(51,51,102,0.5); | |
} | |
#border:before { | |
content:"border"; | |
} | |
#content:before { | |
content:"content"; | |
} |
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
<p id="border">Curso de HTML5 e CSS3 na e-Genial</p> | |
<p id="content">Curso de HTML5 e CSS3 na e-Genial</p> | |
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
{"view":"separate","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment