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
๋ณต์ฌ