I
I
impass2011-09-21 01:31:08
css
impass, 2011-09-21 01:31:08

How to change the format of bullets in an ordered list without resorting to :before and CSS3 selectors?

I have a numbered list

<ol>
  <li>первый</li>
  <li>второй</li>
  <li>третий</li>
</ol>

As you know, the numbering of paragraphs is displayed in the format number + point. I would like to replace this very point with something else, in particular a bracket.
In CSS3, the ::marker pseudo-element comes in very handy in this regard , which allows you to more flexibly customize the format and style of the marker. And what to do without it?
The head-on option using :before and content doesn't look very good.
OL>LI:before {
  counter-increment: item;
  content: counter(item) ") ";
}

Moreover, it is not so easy to align the marker itself with such a decision, regardless of the content of the paragraph.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tick, 2011-09-21
@tick

The :before option is the Consortium's standard recommendation. I don't understand what you don't like about it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question