A
A
Anton Boyarsky2020-09-11 19:06:55
css
Anton Boyarsky, 2020-09-11 19:06:55

How to center a list inside a nav tag?




photo.jpg





  • Categories
  • About Us
  • Contacts




Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alebcgdbd, 2020-09-11
@Alebcgdbd

text-align: center;

O
ocheretnyi_1207, 2020-09-11
@ocheretnyi_1207

set the list width and margin: 0 auto;

S
Steppp, 2020-09-11
@Steppp

or justify-content: center;

D
Dima, 2020-09-11
Dolgoter @SpiderPigAndCat

since everyone writes ways to center it, then
position:absolute;
left:50%;
transform:translateX(-50%)

G
German Zuiakov, 2020-09-13
@HermanZuiakov

ul{
    justify-content: center;
    align-items: center;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question