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!

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


Why did we use <li class="grid-25 tablet-grid-50">. There's no this class name in index.html. ?


2 Answers

Steven Parker
Steven Parker
227,167 Points

These classes are both defined in css/main.css.

You're right, they aren't used in index.html, which only means they aren't in the document to start with.

But when the JavaScript code in the displayPhotos function runs, it will create new HTML that will be added to the document in the <div> element that has the id of photos. Those classes will then be targeted by the CSS rules to give them the desired styling.

Thank you Steven .