{"id":332764,"date":"2021-01-15T07:59:43","date_gmt":"2021-01-15T15:59:43","guid":{"rendered":"https:\/\/css-tricks.com\/?page_id=332764"},"modified":"2021-01-15T07:59:45","modified_gmt":"2021-01-15T15:59:45","slug":"202-centered-list-markers","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/video-screencasts\/202-centered-list-markers\/","title":{"rendered":"#202: Centered List Markers"},"content":{"rendered":"\n

Like so many things CSS, there is all sorts of little stuff to know, even something as minuscule as centering a list marker.<\/p>\n\n\n\n

A reader wrote in with a screenshot of what they were trying to accomplish \u2014 basically an ordered list (<ol><\/code>) with the list markers (1., 2., 3., etc) on top of the list content and centered. In the screenshot, the text was centered, but the numbers were not. So, let’s get those numbers centered!<\/p>\n\n\n\n\n\n\n\n

The first thing to know is that list-style-position<\/a><\/code> needs to be inside<\/code>. That’ll get the centering party started. If we have a break before the content, we’re pretty much there. In the video, we play with using the ::marker<\/code> to do this, while finding limitations and exploring all the ideas. <\/p>\n\n\n\n