๐ŸณCoding apple HTML/CSS All-in-one : ๊ธฐ์ดˆ๋ถ€ํ„ฐ Bootstrap, SASS, ๊ณ ๊ธ‰ animation ๊นŒ์ง€ ๊ฐ•์˜๋ฅผ ๋ณด๊ณ  ์ •๋ฆฌํ•œ ๊ธ€์ž…๋‹ˆ๋‹ค ๐Ÿณ

๐Ÿ’ซ float ์†์„ฑ

div ๋ฐ•์Šค๊ฐ€ ์˜†์œผ๋กœ ์˜ค์ง€ ์•Š๊ณ  ์•„๋ž˜๋กœ ๋‚ด๋ ค๊ฐˆ ๋•Œ ์‚ฌ์šฉ
์š”์†Œ๋ฅผ ๊ณต์ค‘์— ๋„์›Œ ์™ผ์ชฝ/์˜ค๋ฅธ์ชฝ ์ •๋ ฌ

<div>
  <div class="left-box"></div>
  <div class="right-box"></div>
</div>
.left-box {
  width : 100px; 
  height : 100px;
  float : left;
}
.right-box {
  width : 100px; 
  height : 100px;
  float : left;
}

float ์†์„ฑ์œผ๋กœ ๊ฐ€๋กœ ์ •๋ ฌํ•  ๋• ์˜์ƒ์ฒ˜๋Ÿผ float ๋ฐ•์Šค๋“ค์„ ์‹ธ๋งค๋Š” ํ•˜๋‚˜์˜ ํฐ div ๋ฐ•์Šค๋ฅผ ๋งŒ๋“ค๊ณ  ํญ์„ ์ง€์ • ํ•ด ์ฃผ๋Š” ๊ฒƒ์ด ์ข‹๋‹ค.
ย 

๐Ÿ’ซ clear ์†์„ฑ

float ์†์„ฑ์„ ์‚ฌ์šฉ ํ•œ ๋’ค ์‚ฌ์šฉ
์š”์†Œ๋ฅผ ๊ณต์ค‘์— ๋„์›Œ ์™ผ์ชฝ/์˜ค๋ฅธ์ชฝ ์ •๋ ฌ

<div>
  <div class="left-box"></div>
  <div class="right-box"></div>
  <div class="footer"></div>
</div>
.footer {
  clear : both
}

clear ์†์„ฑ์„ ์‚ฌ์šฉํ•˜๋ฉด float ๋‹ค์Œ์— ์˜ค๋Š” ๋ฐ•์Šค๋“ค์ด ์ œ์ž๋ฆฌ๋ฅผ ์ฐพ๊ฒŒ ๋œ๋‹ค.

By Dozzing

๋‹ต๊ธ€ ๋‚จ๊ธฐ๊ธฐ

์ด๋ฉ”์ผ ์ฃผ์†Œ๋Š” ๊ณต๊ฐœ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•„์ˆ˜ ํ•„๋“œ๋Š” *๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค