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!

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


christopher walsh
christopher walsh
7,272 Points

my list is stuck to the left side

I cant figure out why my list is stuck to the left side.

    <title>My Website</title>

    <link rel="stylesheet" type="text/css" href="style.css">



    <div class="mainContent">


    <div class="firstArticle">

    <div class="secondArticle">

    <div class="thirdArticle">

    <div class="moreContent">

    <div class="footer">



  • {border: 2px dotted black; padding:5px;}

body {background-color: #6ac1c4; }

header { width: 100%; background-color:#5ca2de; hight:75px; }

li {display:inline-table; padding: 0px 75px; margin: 0px auto;

text-align: center;

} nav { padding: 10px; align-content: center;


18,266 Points

Typo on head style for "Height" & align-content needs to be used with flex styles.

3 Answers

Sergey Podgornyy
Sergey Podgornyy
20,660 Points

What is align-content? You need the following code:

nav { padding: 10px; text-align: center;}
18,266 Points

align-content is part of the new styles introduced with flex styles.

#main {
    border: 1px solid #000000;
    display: flex;
    flex-wrap: wrap;


18,266 Points

Here is a working version with two columns for nav.


Jake Ford
Jake Ford
9,230 Points

I see you have given the li a margin: 0px auto, but maybe you should be targeting the ul as a whole. Try giving the ul some positioning:

    width: 40%;
    margin: 0 auto;

You have to remember to give it a width for the margin: auto to work.