HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>margin - κ°λ³ μμ±</title>
<link rel="stylesheet" href="css/04_margin_property.css">
</head>
<body>
<center><h1>margin κ°λ³ μμ±</h1></center>
<div class="container">
<section></section>
<section></section>
<section></section>
<section></section>
</div>
</body>
</html>
HTML
볡μ¬
CSS
.container {
position: relative;
width: 1200px;
border: 3px dashed orange;
margin: auto;
}
section {
margin-top: 20px; /* mt20 β¬ */
margin-right: 40px; /* mr40 β‘ */
margin-bottom: 80px; /* mb80 β¬ */
margin-left: 160px; /* ml160 β¬
*/
width: 200px; /* w200 β */
height: 200px; /* h200 β */
display: inline-block; /* dib π */
border: 3px solid gray; /* border π© */
}
CSS
볡μ¬


