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
Miranda Wood
825 PointsNav text not centered
My nav text is not centered on the page--it's in the center, but a little too far to the right compared to everything else that's centered on page. Here's my code:
nav { text-align: center; padding: 10px 0; margin: 20px 0 0; }
1 Answer
Sarah Brethour
4,145 PointsWithout seeing the rest of what you're working on I'm not sure I can give you an answer. But if you're trying to center an element (as opposed to the text itself) you will want to set your left and right margins to "auto".
Hope that helps!
Miranda Wood
825 PointsMiranda Wood
825 PointsI needed to center the text. I figured it out. Thanks.