The clear property specifies which side(s) of an element other floating elements are not allowed.
CSS Syntax
clear: none|left|right|both|initial|inherit;
Property Values
| Value | Description |
|---|---|
| none | Default. Allows floating elements on both sides |
| left | No floating elements allowed on the left side |
| right | No floating elements allowed on the right side |
| both | No floating elements allowed on either the left or the right side |
| initial | Sets this property to its default value. Read about initial |
| inherit | Inherits this property from its parent element. Read about inherit |
clearプロパティは、floatプロパティで左寄せ、 または右寄せを指定された要素に対する回り込みを解除する際に使用します。
■値
- left
- 左寄せされた要素に対する回り込みを解除します。
- right
- 右寄せされた要素に対する回り込みを解除します。
- both
- 左寄せ、または右寄せされた全ての要素に対する回り込みを解除します。
- none
- 回り込みを解除しません。これが初期値です。