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 Layout Techniques Flexbox Layout Providing Fallbacks with Modernizr

Placid Rodrigues
Placid Rodrigues
12,630 Points

Downloaded modernizr file is not working.

Hi,

I have downloaded the modernizr.js file from modernizr.com and linked the js file in my index.html head. But when I test it in Chrome dev tools, the class for html element does not show up.

However, when I use the modernizr.js file from the project files of the video, it works.

Has anybody else faced this issue? Why is it happening?

Thanks, Placid

1 Answer

Brad Lacke
Brad Lacke
7,438 Points

Placid:

I had the same problem; what I found the problem to be was that the modernizr file I generated was called "modernizr.custom.13957.js", whereas Guil's is simply "modernizr.js", which is the path he's specified in the css file. As soon as I corrected the path to point to my modernizr file, I got the flexbox and no-flexbox classes. Hope this helps.

Placid Rodrigues
Placid Rodrigues
12,630 Points

Hi Brad, thanks for your response. But my path is correct. I had renamed the downloaded file from modernizr.com to modernizr.js and properly defined the path. But it didn't work.

Brad Lacke
Brad Lacke
7,438 Points

Hmm. I'm stumped then. What program are you using to load a preview into Chrome?