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

JavaScript Treehouse Club - MASH MASH - HTML Forms, Divs, and Inputs

Mariah Schmidt
seal-mask
.a{fill-rule:evenodd;}techdegree
Mariah Schmidt
Full Stack JavaScript Techdegree Student 13,573 Points

Stuck on the div code challenge in MASH

I can NOT get this work. I've put that line literally everywhere, and I keep getting the same Bummer! message: "The class attribute on your second <div> element needs to be set to "favorite_stuff". Make sure it's all lower case, and that you have an underscore character in the middle." I'm not misspelling it. I've messed around with spacing. I've rewatched the related video several times. Where am I going wrong?

index.html
<body>
  <h1>First Day of School</h1>

  <form>

<div class= "favorite_stuff">
    <div>
     <div class=  "favorite_stuff">
      <h4>Favorite Foods?</h4>
      <input name="food[]">
      <input name="food[]">
      <input name="food[]">
      <input name="food[]">

      </div>

    <div class="favorite_stuff">
      <div class= "favorite_stuff">
      <h4>Favorite Animals?</h4>
      <input name="animal[]">
      <input name="animal[]">
      <input name="animal[]">
      <input name="animal[]">

    </div>

  </form>

</body>

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! This challenge starts with two divs already in place. The idea being that you're supposed to add the class "favorite_stuff to the divs that were already there. But you've started two new divs all on your own. My best advice is to restart the challenge and then just add the class to the two divs that are there.

Good luck! :sparkles: