Site logo

Archived topic

Start Value Not Working on OL List

3 replies · Started by Lewis on August 8, 2022

Viewing posts 1–4 of 4

I have a post with a set of instructions but midway through the list I have an image. I then want to remaining instructions to start from a higher value which I am setting in the Wordpress post settings for start value. I can see in the code for the post that start=3 is being added to the

    but this isn't being shown on the public post.

    My CSS for the OL and LI is as follows:

    .entry-content .list-container {
        counter-reset: list-counter;
    }
    .entry-content ol {
        list-style: none;
        margin-left: 1px;
    }
    .entry-content ol li::before {
        content: counter(my-awesome-counter) ") ";
        margin-right: 2px;
        font-size: 19px;
        font-weight: 600;
    }
    .entry-content ol li {
        margin-bottom: 40px;
        margin-top: 45px;
        counter-increment: my-awesome-counter;
        overflow: hidden;
    }

    So, at the moment instructions go 1,2,IMAGE,1,2,3
    But it should go 1,2,IMAGE,3,4,5

    Thanks!

Hi there,

based on your above CSS, this rule:

.entry-content .list-container {
    counter-reset: list-counter;
}

Needs to be:

.entry-content {
    counter-reset: my-awesome-counter;
}

That was easy! Thanks David!

You're welcome !

This archived topic is closed to new replies.