How can you clear sides of a floating elements | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 20

How can you clear sides of a floating elements

Clear Floating

26th Apr 2019, 6:53 PM
Rapt[#Demure]
Rapt[#Demure] - avatar
3 Answers
+ 4
Add an clearfix element after the float element More information https://css-tricks.com/snippets/css/clear-fix/
27th Apr 2019, 1:12 AM
Calviղ
Calviղ - avatar
+ 3
When clearing floats, you should match the clear to the float: If anelement is floated to the left, then you should clear to the left. Your floated element will continue to float, but the cleared element will appear below it on the web page.
26th Apr 2019, 7:28 PM
Alessio Benvenuti
Alessio Benvenuti - avatar
0
U also have to give border size
8th Jun 2019, 8:59 AM
NAKUYA JOSEPHINE
NAKUYA JOSEPHINE - avatar