how to make li elements centered ?

header{

position: fixed;
left: 0;
right: 0;

}
header p{
background-color: tomato;
margin: auto;
max-width: 70ch;
}
.header{
display: flex;
flex-direction: column;
background-color: tomato;
margin: auto;
max-width: 70ch;
height: 0;
overflow: hidden;
transition: .3s ease-in;
}
.header li{
max-width: fit-content;
margin: auto;
list-style-type: none;
}
.opened{
height: auto;
}
header{

position: fixed;
left: 0;
right: 0;

}
header p{
background-color: tomato;
margin: auto;
max-width: 70ch;
}
.header{
display: flex;
flex-direction: column;
background-color: tomato;
margin: auto;
max-width: 70ch;
height: 0;
overflow: hidden;
transition: .3s ease-in;
}
.header li{
max-width: fit-content;
margin: auto;
list-style-type: none;
}
.opened{
height: auto;
}
No description
6 Replies
Mannix
Mannix3w ago
reset the default padding on the ul element to 0 ??
13eck
13eck3w ago
What's the HTML look like? And can you make a codepen? Though they look centered in your screenshot
i_lost_to_loba_kreygasm
my bad , your answer worked
13eck
13eck3w ago
Be sure to add the SOLVED tag
i_lost_to_loba_kreygasm
i did , does it not show up for you ? D:
13eck
13eck3w ago
Had to click away and back and it showed up >_< Yay, lag lol

Did you find this page helpful?