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

Is it safe to start using Flexbox?

I'm doing the Flexbox CSS course at the moment, and it's fantastic to see how powerful this feature is. It makes working with inline-blocks and floats seem hacky in comparison.

I understand that compatibility is better than it was, and that there's never a guarantee - for example users might be using IE8 and there's nothing I can do to stop that - but generally speaking, is it considered acceptable to use Flexbox for sites now?

Specifically, I'm looking to build a simple portfolio page for myself, mostly just to demonstrate that I have some basic HTML/CSS capability. Do you think it would be appropriate to use Flexbox for the layout?

6 Answers

Karolin Rafalski
Karolin Rafalski
11,368 Points

I have been trying to land a job as web dev for a few months and I have gotten a bunch of interviews and from what I have learned in these interviews is that, generally, smaller companies and start-ups are happy to use flex box. The resistance is from older and/or larger companies that feel it is important to continue support for older browsers for any clients that cannot or will not update their computers/browsers.

And that also goes for technologies beyond flex box.

Thanks! That's very useful to know and answers my question - I'll go ahead and use it for my personal site.

YES!! use it. There are issues such as not supported in IE8 and massive bugs in IE11, but really who cares, use it and enjoy it, because its great. if you ever want to know the support for something go here:

can i use

I hope this helps.

Kevin Korte
Kevin Korte
28,149 Points

The beautiful part is that you'll kinda know by basic logic who will be using your site primarily. If you were building some big sass site, that would be used by a lot of larger companies, you may want to avoid flexbox.

Most individual users like you or me, even your prarents, or your grandparents are using browsers that support flexbox. It would be hard pressed not to, because most computers die (poorly maintained/infected) after a few short years, and so people buy a new computer, and thus have a new, pre-installed browser, or go download their trusty cough chrome cough and away they go.

Larger companies, however, are much slower to upgrade and generally get much longer life out of their equipment. If they have still have some dinosaurs commonly referred to as Windows XP, well they simply can't have anything newer than IE8. And many employees have no privileges to update their computer, which is then left to the lowly network guys, to eventually upgrade/update the hardware through the business. This is expensive both in hardware cost, and labor cost, as you can imagine.

So all that to say, if you're customers/visitors aren't going to be bigger business, than absolutely start using flexbox in production. I do, without qualm.

FYI, I'm working on a total site rebuild for a homebuilder, and I've been collecting google analytics on their old site while I work on the new one. Out of 1,000's of unique hits, probably somewhere around 3,000 unique visitors, there has only been 1 single IE8 user, and my "browsers that don't support flexbox" visitors are less than 1% of total visitors, so yes, I'll be using flexbox.

Steven Parker
Steven Parker
231,269 Points

:point_right: Flexbox is supported by all modern browsers.

IE8 is not a "modern browser". :wink:

Thanks for these answers. I guess my question is a matter of judgement - knowing that it's supported by most but not-quite all browsers in use today, would a website built with flexbox be seen as insufficiently sturdy?

Is flexbox widely used out in the real world at the moment?

Honestly at my firm its a case by case basis. and entire website probably not, due using other frameworks, but a landing page, yes.