Last active
August 29, 2015 14:22
-
-
Save rurtubia/9d46f080540729afa1d5 to your computer and use it in GitHub Desktop.
HTML DIV element
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
<!--top, right, bottom, left--> | |
.green-box { | |
background-color: green; | |
margin: 40px 20px 20px 40px; | |
} |
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
<!--top, right, bottom, left--> | |
.red-box { | |
background-color:red; | |
padding: 20px 40px 20px 40px; | |
} |
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
.green-box { | |
background-color: green; | |
margin-top: 40px; | |
margin-left:40px; | |
margin-bottom:20px; | |
margin-right:20px; | |
} |
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
.green-box { | |
background-color: green; | |
padding-top: 40px; | |
padding-left: 40px; | |
padding-bottom: 20px; | |
padding-right: 20px; | |
} |
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
<style> | |
.gray-background { | |
background-color: gray; | |
} | |
</style> | |
<div class="gray-background"> | |
<p>Text</p> | |
</div> |
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
<style> | |
.injected-text { | |
margin-bottom: -25px; | |
text-align: center; | |
} | |
.box { | |
border-style: solid; | |
border-color: black; | |
border-width: 5px; | |
text-align: center; | |
} | |
.yellow-box { | |
background-color: yellow; | |
padding:10px; | |
} | |
.red-box { | |
background-color:red; | |
padding: 20px; | |
} | |
.green-box { | |
background-color: green; | |
padding: 20px; | |
} | |
</style> | |
<h5 class="injected-text">margin</h5> | |
<div class="box yellow-box"> | |
<h5 class="box red-box">padding</h5> | |
<h5 class="box green-box">padding</h5> | |
</div> |
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
<style> | |
.injected-text { | |
margin-bottom: -25px; | |
text-align: center; | |
} | |
.box { | |
border-style: solid; | |
border-color: black; | |
border-width: 5px; | |
text-align: center; | |
} | |
.yellow-box { | |
background-color: yellow; | |
padding:10px; | |
} | |
.red-box { | |
background-color:red; | |
padding: 20px; | |
margin: 20px; | |
} | |
.green-box { | |
background-color: green; | |
padding: 20px; | |
margin: 10px; | |
} | |
</style> | |
<h5 class="injected-text">margin</h5> | |
<div class="box yellow-box"> | |
<h5 class="box red-box">padding</h5> | |
<h5 class="box green-box">padding</h5> | |
</div> |
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
<style> | |
.injected-text { | |
margin-bottom: -25px; | |
text-align: center; | |
} | |
.box { | |
border-style: solid; | |
border-color: black; | |
border-width: 5px; | |
text-align: center; | |
} | |
.yellow-box { | |
background-color: yellow; | |
padding:10px; | |
} | |
.red-box { | |
background-color:red; | |
padding: 20px; | |
margin: -15px; | |
} | |
.green-box { | |
background-color: green; | |
padding: 20px; | |
margin: -15px; | |
} | |
</style> | |
<div class="box yellow-box"> | |
<h5 class="box red-box">padding</h5> | |
<h5 class="box green-box">padding</h5> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment