CSS Float

So an element that is floating left within a bigger element/container just means: The element is aligned left within it's container But every other element also inside the container can 'wrap' around it? So making an element float kinda makes it an inline element right? And to confirm, clear just tells what elements AREN'T allowed to float?


3/18/2019 12:48:04 AM

J3fro C

2 Answers

New Answer


Yes, float:left makes it act like an inline element. The next element will go to the right of it, as long as it fits. If the second element doesn’t have the float:left, the floating will be done and the next element will go below it. Clear removes floating. You can specify which floating to remove. Most common is clear:both. https://www.w3schools.com/CSSref/pr_class_clear.asp


#titanic { float: none; }