Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKevin Tucker
4,987 PointsAdvantages and Disadvantages of using the different display properties
Hello,
Probably a bit of a long question but what are the different advantages and disadvantages of using:
1 - Floats 2 - Absolute, Fixed, Relative, Static positioning 3- Flexbox
Or is it just down to personal preference? Are there certain things that one display property can do but others can't etc
Cheers!!
1 Answer
Steven Parker
231,248 PointsThe newer "flexbox" technology is an effective replacement for "float" in most circumstances, and provides much better control. "Float" can still be useful in trivial situations and will of course be found in legacy code.
But the different types of positioning all have different purposes. This will become more clear as you continue into more advanced courses where you will see examples of how they are best used.