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 trialJason Veiga
Front End Web Development Techdegree Graduate 12,347 PointsI 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
231,236 PointsSince 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;
}
Jason Veiga
Front End Web Development Techdegree Graduate 12,347 PointsWow that worked. I could not figure it out for the life of me. Thank you so much!
Jason Veiga
Front End Web Development Techdegree Graduate 12,347 PointsJason Veiga
Front End Web Development Techdegree Graduate 12,347 Pointshttps://w.trhou.se/sr9vqe5z47