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!

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


Jason Veiga
Jason Veiga
Front End Web Development Techdegree Student 6,902 Points

I am having issues evenly placing label to the left, and input fields to the right (Online Registration Form, Project 3)

When creating a form using the @media screen and (min-width 768px), I am having issues evenly aligning the form, so that the labels are to the left (Name, Email Address, Phone Number, etc), and the input field is to the right.


2 Answers

Steven Parker
Steven Parker
224,872 Points

Since these are already flex items, you can just add a couple of parameters to the labels to align them:

/* inside the media query */
  label {
    flex-basis: 80px;
    align-self: center;