HTML How to Make a Website CSS: Cascading Style Sheets Center the Wrapper

Vladimir Kozak
PRO
Vladimir Kozak
Pro Student 986 Points

Wrapper id not working?

I have attempted to use a wrapper id to center the surrounded elements but whenever I open up the webpage everything is still aligned on the left hand side. Apparently the div tag is not showing up in this pasting of my code. Imagine it being right before header and after the closing footer tag, and encapsulating all that code.

Liam Clarke
Liam Clarke
Pro Student 5,891 Points

ideally i need more information than this since your not stating what method your using, so im just going to show you the way i do it.

In your CSS write this

/* This represents the wrapper */
.wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
}

/* This represents multiple DIRECT children of the wrapper */
.wrapper-item {
    width: 10em;
    height: 10em;
    text-align: center;
    background: lightgrey;
}