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 trialSHESHMANI CHAUDHARY
12,912 PointsWhy did we use <li class="grid-25 tablet-grid-50">. There's no this class name in index.html. ?
AJAX
2 Answers
Steven Parker
231,184 PointsThese 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.
SHESHMANI CHAUDHARY
12,912 PointsThank you Steven .