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
jose macedo
6,041 Pointscss help
how do I center my h1, input and label elements???
1 Answer
Steven Parker
243,656 Points
Here's one way:
.red { padding-left: 0; padding-right: 0; }
h1, label, input { width: 100%; text-align: center; }
Be sure to put it at the end, so it can override some of the existing settings.
Julien riera
14,665 PointsJulien riera
14,665 PointsIf I understand your issue correctly, this should help :