Single Digit Numbering in List

When creating an ordered list recently with more than 10 items, the numbers looked like they reset at 0 and only had one digit. I knew that the list was being generated correctly with 2 digits because the visual view in the post editor showed the proper numbers. It just wasn’t showing up in the actual post itself.

Using Chrome’s Developer tools, it looked like the margins for the ol element weren’t wide enough. This was set by the CSS in the parent theme. I added an entry to the child theme’s style.css to override the margin and increase the left margin to 2 em. Refreshed the page and the numbers came up correctly!

ol {
        margin: 0 0 18px 2em;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s