Can't pass last two tests in survey form project

Tell us what’s happening:

Hey guys, I’ve almost finished my survey form and I can’t get the last two conditions pass! The and tags are in between the tags yet the test suite is failing them.

Any ideas?

Any other (constructive) criticism would be appreciated too!


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:

ok so the problem is that you have section tags as children of your form instead of putting the form elements (like textarea and submit) as children.

I would try the following in order:

  • change all section elements nested inside the form to ‘div’ elements, retest. if that passes, then that is the least amount of coding change you need (I would imagine).
  • if not, go for a more drastic change and dump the section elements entirely and re-test. If it passes, fix your css to make it look the way you want again (major changes will be needed).

Note that section tags are not used inside forms because they indicate unrelated parts of the page (or very loosely related). So rethinking these, even if they were not causing a problem, would still be a good exercise.

I got it, thank you!

I see what you mean about the section tags, I’ll make note of that for future reference. I’ll also make sure to start with the user stories first and not try bend around them afterwards!

I simply renamed the section tags as divs but kept the section id for my css. Then I just moved my last section ©, that had the submit button and textarea, in to the ul with my questions in the form.

I’m not exactly sure why this worked, as the ul was created after the form, but I’ll continue tweaking it as I continue.

Thanks again for your help!

no problem. I’m glad this helped. Please also refer to my post on how to debug css which has a very useful article on techniques you can use in future.

1 Like