Noobie Perspective on Floats, Flexbox and Grid Layouts

As an aspiring developer that is completely new to the tech industry, deciding on which method to use for layouts is always errr….. difficult.

Just kidding, come on we all know the answer to everything is flexbox.

Now before I go off on how flexbox changed my life, I understand floats will always have their place in coding and will always have superior browser support capabilities but damn. After 1 project at HackerYou’s bootcamp using just floats, I miss it more than ever.

After learning how to use flexbox during my intro web development class, I was flexing on everything. The ability to align and manipulate elements with flexbox in CSS is just too damn efficient to pass up. Modern web design just fits perfectly into how flexbox functions. Imagine if our web developer ancestors were given the knowledge to flexbox, what amount of internet blasphemy would occur?

Now grid layouts are quite interesting, shoutout to Katherine Konn for introducing it during her show and tell. Now I haven’t actually used it yet but if I was tasked to create a method for developers to create layouts by the internet gods, it would be quite similar to how grid layouts currently function using numbered columns and rows.

Here is a comprehensive guide on the CSS Grid Layout for those who are looking.

However, the use of grid layout will possibly be a glimpse into the future for now as it is extremely lacking in present-day web support.

Now which one would I use? The answer: depends. If I needed a basic website with minimal updating, I would float just to keep things simple. I would only use flexbox for sites that I know will have additional content for the ability to manipulate the layout much quicker than using floats. Also keep in the mind the audience that would be viewing the sites for accessibility requirements. Now with grid layouts, I can see a lot of potential but I want to be more experienced with it before I comment further about it. Stay tuned!

Deciding which one to use will always depend on the developer and there is usually no one-fits-all solution in web development (except clearfix, duh). Although my bias for flexbox is obvious, I must also stress that its important to understand how everything works and being versatile is something every developer should strive for.