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
Michael Bredthauer
13,429 PointsCentering nav elements
I am having trouble centering my navigation elements. When I remove the bullet style with list-style: none; and use text-align: center; my nav elements are always off center. how do i fix this?
3 Answers
Philip Cox
14,818 PointsHi Michael. text-align: center will align the text to the center of the elements in in. It won't align the element to the center. display: inline-block will put your list items inline with one another and give them block level control.
Maybe add some code, and say what lesson your problems on if this does not help. When adding html examples code, use [ ] braces as angle brackets won't show up.
:)
Michael Bredthauer
13,429 Points.main-nav li { background: white; border-radius: 8px; list-style: none; display: inline-block; }
here is my code, the bullets are gone but the space where they were still exists, how do I get rid of that space
Philip Cox
14,818 Pointsul come with a padding. Set padding to 0.
:)
Michael Bredthauer
13,429 PointsMichael Bredthauer
13,429 PointsThanks ill give that a shot, its not on any specific lesson I was just trying to practice