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

front-end web development|Take a mobile first approach|how to make a website

I have nav under header so why was the centering and margin cascade not applied to the navs of Portfolio, About and Contact? <header> <a href="index.html" id="logo"> <h1> Na</h1> <h2>Nu</h2>
</a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li>

    </ul>
  </nav>
</header>

3 Answers

Alexander Styagov
Alexander Styagov
7,568 Points

Try to set text-align: center to header

Thanks for your reply. This is what I had </head> <body> <header> <a href="index.html" id="logo"> <h1> Nta</h1> <h2>Nse</h2>
</a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li>

    </ul>
  </nav>
</header>
Alexander Styagov
Alexander Styagov
7,568 Points

Am I right, you have un-ordered list with 3 link-elements: Portfolio, About and Contact? And you should centered them? If you're watching lesson-video then just make it as well as teacher. If not, then just try to set text-align: center to header, as I wrote above. Hope, you'll get success. UPD: I don't quite understand what 'Nta Nse' means

Thank you for your help once more. The centering was applied to the anchor element which wrapped the headline which in my case included Nta Nse. I watched the video over and realised that the anchor element does not include the unordered list. Thank you for being so quick to help me. :-)