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 How to Make a Website Customizing Colors and Fonts Organize CSS with Comments

Regarding the CSS nav comment "/* nav background on mobile devices */"- why is it only for mobile devices?

It clearly works on non-mobile devices, so this is confusing. Can you explain?

1 Answer

The lesson is how to comment. You usually want different CSS for mobile, tablets, and desktops so you can improve mobile performance and look. The CSS will work on larger devices, but will not look as good because it will be formatted for a small screen. The comment is there to help remind you that the small screen formatting is there.

But soon you will have the base for small screens and add for larger. It is called mobile first design.

That makes sense, thanks Ted. I realized after I asked this question that the general lesson was "mobile-first" so I assume the work we're doing will be encapsulated in mobile specific CSS.