+ 1
If I want to make a list in the centre of webpage including the numbers. What would be the syntax?
I tried align="center" in between <li tags.> didn't work out!
2 Antworten
+ 3
use ur code b/w <centet> </center> tag
+ 2
HTML list is a block element. It fills all available width. Centering it while it's taking up 100% width wont have any effect. First you have to give it a width of less than 100% then a style of 'margin: auto;'.
Example:
ol {
width: 60%;
margin: 0 auto;
}
In CSS that is.