Created
December 1, 2013 20:44
-
-
Save jieter/7740558 to your computer and use it in GitHub Desktop.
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
<html> | |
<head> | |
<style> | |
h1 { | |
width: 404px; | |
margin: 10px auto; | |
clear: both; | |
} | |
.container { | |
clear: both; | |
margin: 10px auto; | |
min-height: 102px; | |
width: 402px; | |
border: 1px solid red; | |
background-color: #fee; | |
} | |
.block { | |
padding: 0; | |
margin: 0; | |
width: 100px; | |
height: 100px; | |
border: 1px solid blue; | |
background-color: rgba(100, 0, 100, 0.2); | |
font-size: 11px; | |
font-family: sans-serif; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>10px margin:</h1> | |
<div class="container"> | |
<div class="block">Geen marge, geen padding</div> | |
</div> | |
<div class="container"> | |
<div class="block" style="margin: 10px;">10px marge, geen padding</div> | |
</div> | |
<div class="container"> | |
<div class="block" style="margin: 10px; padding: 10px;">10px marge, 10px padding</div> | |
</div> | |
<h1>Verschillende zij/boven+ondermarges</h1> | |
<div class="container"> | |
<div class="block" style="margin: 10px 40px; padding: 5px">10px boven en ondermarge, 40px zijmarges, 5px padding</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment