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

nitsa einan
nitsa einan
1,593 Points

I don't succeed in passing this challenge (div class in digital literacy). I think there is a bug...

can I get help in solving the div challenge in the digital literacy course? I looked at examples, but every time I get a bummer...

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

I'd like to see your code so that we can say whether or not what you're putting in the challenge is correct or if it is indeed a bug, as you believe. At the bottom of this page :arrow_heading_down: is a link to a markdown cheat sheet immediately below the leave an answer box. This will teach you how to post your code here in a legible way so that we can help you.

Aaron Martone
Aaron Martone
3,290 Points

I think the initial problem is that people post here assuming everyone else knows the context of where you're coming from. Most people start off their requests for help like this where they say "Something is not working, can you help?" And though we're all willing to help, that literally gives us no information to start on.

Try providing us with some thorough information about what you're trying to do (post code samples), what you have tried, what you're expecting, and what is not happening. We need you to help us help you by being more informative. Thanks.

3 Answers

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

nitsa einan Hi there! Well it's not a bug at least! The challenge asks you to assign the class "favorite_stuff" to the divs they already set up for you. But you added the first part of two new divs and an entirely new div just before the beginning of the form. And the ones that you wrote have no closing tags. Here's what it was looking for:

<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">
      <h4>Favorite Animals?</h4>
      <input name="animal[]">
      <input name="animal[]">
      <input name="animal[]">
      <input name="animal[]">
    </div>

Hope this helps! :smiley:

Joel Tersigni
Joel Tersigni
8,171 Points

I just tried it myself and it worked. There isn't a bug.

Which step are you failing on? As a hint, this is how you would assign a class to a div tag.

<div class="myClass">Hello World</div>
nitsa einan
nitsa einan
1,593 Points

Thanks for your responds. Still not working. It says that there is a problem with the second div. This is the code

<body> <h1>First Day of School</h1> <div class="favorite_stuff">favorite_stuff</div> <form>

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


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

</form>

</body>name="food[]"> <input name