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.
(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">
          <span class="category">CALORIES</span>
          <span class="value">678</span>

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?

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