Search

Margin ๊ฐœ๋ณ„ ์†์„ฑ

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