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


How to make browser specific styles?

Hey guys, I have a question that I am trying to work out currently. I need to make browser specific styles for Flex Box. You can view my site at shawweb.designs/pj. I am using the Flexbox to design the webpage and in older IE browsers and all mobile browers the flex boxes act very differently than my desktop on Chrome. I've tried a few different things in the CSS, but cannot manage to target JUST IE browsers, or just mobile (webkit) browsers. Please, any help is appreciated!

1 Answer

Julian Gutierrez
Julian Gutierrez
19,201 Points

Have you tried Modernizr? I do believe Modernizr can "detect" browsers that are not compatible with flexbox and give you a class to apply targeted CSS to. https://modernizr.com/

I was trying to use that, and I either don't understand or it's not working for me right :/ it still collapses the flex boxes and makes them act weird. I'll keep trying. Thank you!