0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

floatプロパティの理解度を上げる

Last updated at Posted at 2020-03-04

#floatプロパティーとは!?
横並びにできるCSSに打ち込むもの
なので右寄せ、左寄せなど自分が指定した場所に移動ができる!!
#しかし、落とし穴あり😭
実際に使用すると指定した場所が「浮いて」しまい枠が小さくなり、要素が回り込むという事態に!
#その様な場合の対処法
clearfixを入れることにより解決!
↓こんな感じに!(このまま暗記してもいいとのこと!)
clearfix::after {
content: "";
clear: both;
display: block;
}

#clearfixの使い方について
floatの副作用を解決したい部分の親要素にclearfixクラスを付けるだけ!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?