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 Build a Responsive Navigation with Flexbox

Morten Hauge
Morten Hauge
9,240 Points

Should you always use flexbox if possible?

Is there any reason to use the tradional method of floating content on a modern website today? Or should you always use flexbox if possible?

2 Answers

The biggest reason to use the traditional floats would be because of browser support issues. However, flexbox has become much more widely supported by all browsers. http://caniuse.com/#feat=flexbox

It is still a good idea to use -webkit- and -moz- browser fallbacks. But feel free to use flexbox all you want!

display: flex;
display: -webkit-flex;
justify-content: center;
-webkit-justify-content: center;
align-items: flex-start;
-webkit-align-items: flex-start;

Heyy John Shockey , Quick question. Does the code that you provided solve the support issues on IE?

joseph arias: I personally have not run into any issues with IE.

Check out this link: http://caniuse.com/#feat=flexbox

Click on the yellow tab 'Known Issues' for a list of issues some people have had with certain browsers.

Flexbox is great, I don't see a problem, unless your clients are using IE, not not fully supported, so in the end about about who you are making sites for.

Morten Hauge
Morten Hauge
9,240 Points

Thank you! I guess it's great to know how floats work and be able to use them, but I just find flexbox a ton more intuitive which is why I am asking.