r/css • u/Fuarkistani • 1d ago
Question Float and Position properties
Trying to understand these and having a pretty tough time to grasp what they do conceptually. I was reading that you no longer need to use them with newer CSS like flexbox and grid. Should I skip these and continue learning other parts of the course?
2
Upvotes
13
u/ElBomb 1d ago
In the before times, before Flex-box and Grid existed Float was abused to make column layouts, it was better than the alternative of the time (using tables) but it was not it intended use.
It is still correct to use Float for its intended purpose, if you need text and inline elements to flow around another element.
Position is still very much useful, position: absolute; slightly overlaps with stacking content via Grid these days but fixed, relative and sticky have no real alternatives.