[Resolved] OL Start Value Being Ignored?

Home Forums Support [Resolved] OL Start Value Being Ignored?

Home Forums Support OL Start Value Being Ignored?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2330471
    Lewis

    I had a similar issue which was rectified recently but it seems to has caused other issues. I want to have the following:

    1, 2, 3, IMAGE, 4, 5, 6

    I set the start value for the second list as 4 but it is being ignored for some reason. Here is my current code:

    .entry-content .list-container {
        counter-reset: my-awesome-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;
    }

    I can fix the current situation by tweaking the start to this:

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

    However, this then ruins other lists I may have on the page (some pages have more than one list that should each start at 1.

    #2330755
    Leo
    Staff
    Customer Support

    Hi there,

    Not sure if I fully understand – I can’t see how this can be a GP issue as it has no control over how <ol> works.

    Is this issue only happening when using GP?

    #2330763
    Lewis

    Looks to be a GeneratePress issue. If I quickly switch to default WordPress things seem ok.

    I did have this issue a while back and it was fixed with a tweak to the code but it seems to have come back and no idea why.

    If I tweak that bit of code outlined above then it works for that one container but also continues the numbers in future lists. So I can manipulate the OL Tags in the GeneratePress CSS so assume there must be a setting in there somewhere

    #2330839
    Ying
    Staff
    Customer Support

    I do not see any element with the class list-container on your attached page.

    So make sure you’ve added a container with this class that wraps the ol element.

    #2331214
    Lewis

    Have stripped out a load of the OL CSS styling and this seems to have fixed it. Thanks anyways!

    #2331766
    Ying
    Staff
    Customer Support

    Glad it’s working now.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.