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
Greg Larson
Courses Plus Student 1,043 Pointsdiv class - training question confusion
Challenge Task 1 of 2
Quiz Question: We want the same CSS style to apply to both elements. Give both elements the class of "favorite_stuff". Hint: The syntax for giving a class looks like this: <div class="favorite_stuff">
To the best of my knowledge I'm supposed to insert the code above into both div elements. Currently the code above is placed in both elements at the beginning of each, below "<div>" and above the <h4> line. When I insert it into both div elements, where it is currently, I get the error that I need to insert it into the second element, which would imply that it's correctly inserted into the first element. It has been added to both identically.
I have tried everything I can think of, including searching the web. w3schools validates my assumptions yet I can't get anything accepted by the system.
I can't skip past this part and have wasted several days coming back to it to no avail. Please advise.
I was told to include a screenshot but see no way to add it here. :/ Thank you for any help....
4 Answers
Cindy Lea
Courses Plus Student 6,497 PointsYou need to link the challenge so we can see it & try it out. You may have a typo or something else going on too but we cant tell without looking.
Jason Anders
Treehouse Moderator 145,863 PointsHey Greg,
Without seeing your code it's pretty hard to help troubleshoot the problem, as your description does sound correct (but a screenshot is not the way).
If you, instead, click the "Get Help" button directly from the challenge question, it will link your question to the actual challenge. Make sure the "include code" box is checked, and this will also include your code in the question. Another option, will be to include a direct link to the challenge (as it's best if we can access the code challenge, as well) and copy/pasting your code into a comment/question here (using the Markdown Cheatsheet on how to post code).
Hopefully we can help you solve this soon.
Greg Larson
Courses Plus Student 1,043 PointsSorry all. Thanks for your responses and for the help with including the the challenge. I hope this link is what you need.
https://teamtreehouse.com/community/div-class-insertion-into-div-elements
Here's the error I receive: Bummer! Your <div> elements need to both have 'class' attributes.
Jason Anders
Treehouse Moderator 145,863 PointsYes, that was the link and all done correctly. It looks like your question was resolved over there by jcorum.
Good luck with the rest of your learning, and remember, the Community is always here to help. :D
Greg Larson
Courses Plus Student 1,043 PointsThank you Jason!