The correct property is clear. In CSS layout, float removes an element from the normal inline flow and positions it to the left or right, allowing following content to wrap beside it. The clear property controls whether an element may be positioned next to preceding floated elements or must be moved below them. MDN defines clear as the property that sets whether an element must be moved below floating elements that precede it. Typical values include left, right, both, and none, allowing the developer to block floats on one or both sides. display controls the formatting behavior of an element, such as block, inline, flex, or grid. float creates the floating behavior; it does not prevent other floats from appearing beside an element. position controls positioning schemes such as static, relative, absolute, fixed, or sticky. Therefore, only clear directly defines the sides where adjacent floating elements are not permitted. References/topics: CSS floats, content flow, clearing floated elements, layout positioning.
==========
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit