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

HTML HTML Forms Form Basics Overview of Forms

Dan Varnau
Dan Varnau
7,681 Points

Where's the CSS to make the inputs align vertically instead of in a line?

I've looked through all of main.css and can't figure out what makes the inputs align vertically. I assume it's a display property, but I can't figure out where it is.

1 Answer

Jeff Lemay
Jeff Lemay
14,268 Points

So each input is on it's own line?

input {
  display:block;
}
Dan Varnau
Dan Varnau
7,681 Points

That's what I thought it should be, but I can't find it anywhere in the CSS file that's included in the lesson.

display: block is correct but it was applied to the labels rather than the inputs for this project. The inputs are still inline.

line 87:

main.css
label {
  display: block;
  margin-bottom: 8px;
}
Aleksander Samól
Aleksander Samól
Courses Plus Student 2,713 Points

Just to add to the answer:

if you think you know the property, you can search its possible values on-line, e.g. on http://www.w3schools.com/. Just type "display" in the search box and it will tell you all about it ;)