Почему Margin Auto не делает его точно в центре? [дублировать]CSS

Разбираемся в CSS
Anonymous
Почему Margin Auto не делает его точно в центре? [дублировать]

Сообщение Anonymous »

Вот как Auto Auto -Margin Auto, заполнение также является авто. Я использую Chrome
< /p>


body {
font-family: "Nata Sans";
margin: 0;
background-color: black;
color: #eee;
box-sizing: border-box;
}

header {
width: 1200px;
max-width: 90%;
margin: auto;
display: grid;
grid-template-columns: 50px 1fr 50px;
grid-template-rows: 50px;
justify-content: center;
align-items: center;
position: relative;
z-index: 100;
}

header .menu {
margin: auto;
padding: auto;
list-style: none;
display: flex;
justify-content: center;
gap: 20px;
font-weight: 500;
}< /code>

Код: Выделить всё

Text
[list]
[*]Home
[*]Blog
[*]Info
[/list]


Я был бы благодарен, так как я не мог ничего найти в Интернете

Подробнее здесь: https://stackoverflow.com/questions/797 ... the-center

Вернуться в «CSS»