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 CSS Flexbox Layout Understanding Flexbox Flexbox Basics and Terminology

Anja Karg
Anja Karg
6,133 Points

best fallback for internet explorer?

can i really use flex boxes, although it is not supported by ie? how can this be handled?

6 Answers

Hey Anja, I'm sure you have moved on from this concern by now, but I would like to give you my approach to this issue. You can use a script like Modernizr: https://modernizr.com/ to detect if a browser does not support Flexbox. You then use the CSS selector .no-flex (this may change) and target your element within it. Think of that .no-flex class as a body level element, so it should always be used first. I completely understand needing to support older browsers, some clients just want backwards compatibility (even the MS no longer releases updates). Hope this answer is more in line with what you were asking!

Anja Karg
Anja Karg
6,133 Points

Dear Mark,

thanks for your comment. I will try this.

Poort Eighty
Poort Eighty
6,867 Points

I haven't seen all the video's of this Flexbox course yet ... but: It's to bad the instructor doesn't tell you what the current state (at the time of this video) is of web browser support regarding Css Flexbox. Some older versions of Win/IE don't support Flexbox, some later ones do, Win/IE10 supports the 'tweener' syntax of Flexbox. And other modern browser do support Css Flexbox with browser vendor-prefixes and yet other modern browsers support the correct current W3C spec. standard syntax of Flexbox.

Alas some (most) of us frontend developers still need to support Win/IE 9 and up in production web sites, which have various, if at all, Css Flexbox support.

The instructor also doesn't tell you how to properly apply Css Flexbox as a progressive-enhancement technique for modern browsers and what fallback techniques are available for browsers that don't (fully) support Css Flexbox.

And another thing: Css Flexbox itself is great, don't get me wrong (the instructor tells you all the good and great things about Flexbox), but like Css Floats when it came out, Flexbox wasn't intended for full-page layout (Css Grid is). Flexbox is more intended for the layout of UI elements.

IE is being phased out of the web cuz no one uses it anymore and even if it does prevail, it can't keep up without having the necessary browser support; So eventually, no one will use it anymore.

Problem solved.

Happy coding !^_^!

Steven Parker
Steven Parker
231,275 Points

If I understand correctly, the browser used by Treehouse instructors is Google Chrome. You can't go wrong installing it and using it for all your Treehouse courses.

Personally, I bet once you start using it, you'll never touch IE again for anything other than testing compatibility issues.

Anja Karg
Anja Karg
6,133 Points

dear Steven,

caniuse.com says, the ie doesn't support flex box. so i need a solution for this.

IE 10+ supports Flexbox (https://msdn.microsoft.com/en-us/library/hh673531(v=vs.85).aspx) . Microsoft has been deliberately phasing out IE from the market so unless you have a really good reason to be supporting anything before IE 10 in your next project, it is really something you shouldn't be worried about. I am curious to know your reason though?

Ivana Lescesen
Ivana Lescesen
19,442 Points

Hi @guilh thank you so much for your videos. You are great at explaining and I really like your enthusiasm. Could you please tell me should I use Grid or Flexbox for page layout? Why would @Michiel Vos say what he said in his answer above. Thank you so much :)