0

Lists HTML

how do i centre the numbers in a list?

10th Jul 2020, 10:22 PM
Renee White
2 Respuestas
+ 1
The following example centres not only the list item text but also the numbers that are usually kept to the left even when text-align: center is used. I tested the example with Edge, Chrome, and Opera and it worked well in all of them. <!DOCTYPE html> <html> <head> <title>Page Title</title> <style> ol { text-align: center; list-style-position: inside; } </style> </head> <body> <ol> <li>Hello</li> <li>Hello World</li> </ol> </body> </html>
10th Jul 2020, 11:00 PM
Josh Greig
Josh Greig - avatar
0
thank you!
10th Jul 2020, 11:01 PM
Renee White