+ 1

How can I center the list?

23rd Feb 2018, 12:55 AM
Antonio Kai
Antonio Kai - avatar
3 odpowiedzi
+ 3
To center a list you should be able to user align: center in css or html. Btw If you post your code you will get a better answer.
23rd Feb 2018, 2:29 AM
Ole113
Ole113 - avatar
0
@Ole113 Why it doesn't work? <html> <head> <title>first page</title> </head> <body> <p align="center"> <ol> <li>Red</li> <li>Blue</li> <li>Green</li> </ol> </p> </body> </html>
23rd Feb 2018, 10:51 AM
Antonio Kai
Antonio Kai - avatar
- 1
Plug this into your CSS (and make necessary changes according to your code): ul { display:table; margin:0 auto; }
23rd Feb 2018, 3:01 AM
luciel
luciel - avatar