user3906428
user3906428

Reputation: 25

Using CSS ::before tag to display list item index on multiple levels

I'm trying to write the css styles for a two level ordered list, and using the ::before to display the index of the listitem. Everything works fine, except the index of the parent li is somehow displayed in the content of the li as well.

Heres the fiddle project with the problem: jsfiddle.net/h3nt9bfw/

In the li with index 8 there is a 8 at the top right of the li content, and I'd like to remove it, but cant seem to make the css right. Please someone advise. Thanks.

Upvotes: 0

Views: 149

Answers (1)

Ran Sasportas
Ran Sasportas

Reputation: 2266

you can get rid of it using this-

ol.subQuestions.sortableQuestionLists.ui-sortable.ui-droppable:before {
    content: ""!important;
}

you could simplify the selector but thats the basic idea here

Upvotes: 2

Related Questions