The Box Model: Davie's Burgers - how to center ul at the bottom

Hello, after completing Davie’s Burgers exercise I decided to play around a bit.
Course: https://www.codecademy.com/courses/learn-css/projects/box-model-on
(not sure how am supposed to provide direct link).

The ul slector which is holding the list of calories, I wanted it to shrink it in terms of width and center it, so there would be just one list element (li) under another placed on the center of the page.

<ul class="nutrition">
        <li>
          <span class="category">CALORIES</span>
          <span class="value">678</span>
        </li>
        [...]
      </ul>

However I don’t know how to center it, I’ve tried:

ul {
  text-align: center;
}

added to ul.nutrition as well, also adding

align-self: center;

for different selectors, and it didn’t work.

Is there way to center the whole ul horizontally?

EDIT:
Sorry to bother guys, I’ve managed to center with:

ul.nutrition {
  margin: 0 auto;
}

for some reason I though I have to use some sort of align for that, sorry!
Thrash topic if you want.

1 Like