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 trial

CSS

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,254 Points

Flexbox is completely brilliant! :) Can I use it in my next project?

I've looked at the latest caniuse.com stats before anyone suggests that. :)

But I've never used flexbox in a real life project before but I'm finally beginning to understand Flexbox thanks to Guil's excellent Flexbox Layout course.

Are people still holding back on using Flexbox? Would enough people be disadvantaged if I solely used Flexbox to layout my page?

Thanks :)

2 Answers

The questions becomes, does the browsers your targeted user group support flexbox. If you're building a techy site, well most techies have update browsers, so you're good to go.

If your site targets many corporate type users, you may want to thing twice. Because of the cost and time to upgrade, large corporations often move slowly updating when it "isn't broke". So they might be on XP still and can't use a browser that supports flexbox, or they do not have permissions to update themselves.

These are both fringe user case, your user base likely falls in the middle.

My preference is a mixture of both. I'm generally done doing stupid css hacks to get the same layout properties that flexbox provides so eloquently. My build layout blocks I still use a more traditional float based grid, and than use flexbox to position inside of that.

That way, if the user can't support flexbox, the general layout is still there, and the site at least should be "functional".

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,254 Points

Thanks for this, great response.

So I suppose the answer to the question, "how long before everyone catches up?" is "How long is a piece of string" lol. Flexbox has been around for a number of years now. I'd hate to think people would lose out because I used it.

I suppose vendor prefixes are still an option if I couldn't wait?

All modern web browsers support Flexbox, except for IE 10 or Microsoft Edge (partially support if I'm not wrong), you use flexbox in your project with modernzr though. I made my website using flexbox, tested it in all my devices and it was working fine but I also made an extra css for browsers without flexbox support.

Yes, your analogy is right! You can always provide fallbacks for users with legacy browsers using css hacks and extra javascript. As Jesus said, modernizr can help you detect flexbox support, and server these scripts for legacy users.

Flexbox is great and it's looking pretty good on caniuse.com. It will most likely be used more in the future. For example my company that I work for is considering it, however since they're a business they want as much customers to be able to use their website. So they are delaying it a bit because of that.