Text-align: center is working differently for different divs

Tell us what’s happening:
How come #nav-ul and #nav-header both have text-align: center but they aren’t aligned equally? It seems like #nav-ul sticks out to the right a bit. Any ideas?

Your code so far
https://codepen.io/jalal_b/pen/MWjLaZZ?editors=1100

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36.

Challenge: Build a Technical Documentation Page

Link to the challenge:

ul have 40px by default on the left as part of HTML standard specifications.

If you don’t want it, you need to set it specifically.

2 Likes

Not sure if this is actually the correct answer, but I feel it’s at least a solid guess :slight_smile:
the list has these dots on the left, which you have disabled by using “list-style-type: none;”, however it seems as though this only makes the dots disappear, the effect they have on the slight indentation still remains.

Edit: or as it turns out, this is not the dots, but instead the default setting of ul.

1 Like