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

CSS

css help

If I understand your issue correctly, this should help :

label {
  display: block;
  margin-bottom: 8px;
  margin-top: 5px;  
  text-align:center;
}



.container {
   padding: 0 20px 10px 20px;
   margin: auto;
}```

You should look into inline/block elements and how you can handle them.

Hope this helps !

Julien

1 Answer

Steven Parker
Steven Parker
243,656 Points

:point_right: 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.