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

Nav text not centered like the video

So im following along with the video we are are editing the navigation css and i realized that my "nav" text (links) isnt being centered . i dont know what im doing wrong everything seems to be fine tho

try this:

nav ul li a{
  text-align:center;
  padding: 10px 0;
  margin: 20px 0 0;
  }

still havent figured out whats wrong ive looked through the entire code and nothing ..maybe im missing something?

2 Answers

Hey,

By default <ul> elements have some padding on the left. Giving you an indented list. just like you'd see on most text editors. Try setting the padding of your <ul> element to zero.

it didnt work :/

Text align center?