Is there a way to change start numbers within a multi-level list after having already changed the start number for the list segment?Is there an easy way to change the color of a bullet in a list?Is it possible to specify a starting number for an ordered list?Is there any way to make numbers in ordered list bold?css counter-increment for section numbersStyle an Ordered List like “1.1, 1.2” instead of “1, 2”Lessen the indent in a multi-level listUsing CSS counters to create sub-sections with a counter-resetNavbar Dropdown list hidden under second Navbar using BootstrapReseting CSS counter for nested lists formatted as 1.1, 1.2,How to take the sum of items from a list from a user input

Do generators produce a fixed load?

Bayes Nash Equilibria in Battle of Sexes

How does a swashbuckler fight with two weapons and safely dart away?

Why was Germany not as successful as other Europeans in establishing overseas colonies?

What is the point of Germany's 299 "party seats" in the Bundestag?

Nginx subdirectory wordpress wp-login redirects to 404 not found

Please, smoke with good manners

When and why did journal article titles become descriptive, rather than creatively allusive?

Pressure to defend the relevance of one's area of mathematics

Counterexample: a pair of linearly ordered sets that are isomorphic to subsets of the other, but not isomorphic between them

Stateful vs non-stateful app

Will a top journal at least read my introduction?

How deep to place a deadman anchor for a slackline?

gnu parallel how to use with ffmpeg

Can solid acids and bases have pH values? If not, how are they classified as acids or bases?

What word means to make something obsolete?

Mysql fixing root password

How to pronounce 'C++' in Spanish

Do I have an "anti-research" personality?

What are the spoon bit of a spoon and fork bit of a fork called?

Confused by notation of atomic number Z and mass number A on periodic table of elements

Are Boeing 737-800’s grounded?

What does "rf" mean in "rfkill"?

How can the Zone of Truth spell be defeated without the caster knowing?



Is there a way to change start numbers within a multi-level list after having already changed the start number for the list segment?


Is there an easy way to change the color of a bullet in a list?Is it possible to specify a starting number for an ordered list?Is there any way to make numbers in ordered list bold?css counter-increment for section numbersStyle an Ordered List like “1.1, 1.2” instead of “1, 2”Lessen the indent in a multi-level listUsing CSS counters to create sub-sections with a counter-resetNavbar Dropdown list hidden under second Navbar using BootstrapReseting CSS counter for nested lists formatted as 1.1, 1.2,How to take the sum of items from a list from a user input






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I'm currently working on a project converting some training materials from one e-learning system to another, and I'm trying to preserve original formatting where I can (especially when lists tie into images), and this has involved picking up some HTML/CSS commands to help recreate formatting (I'm keeping notes for my colleagues on functions that I'm using so they can also understand it).



In the current lesson, the list of instructions I'm working with is spreading over multiple "cards." I've mostly been able to make this work, but the current card has a graphic tie-in that I'm having some difficulty puzzling out.



What I'm trying to do on this card:



4. Instruction item 4
5. Instruction item 5
5.1 Sub-instruction 1
5.2 Sub-instruction 2
5.3 Sub-instruction 3

Graphic referenced by above

6. Instruction item 6


etc.



The current code sections that I'm finding are not quite getting to that result, though.



I've been researching online (including here), and I'm finding information that helps me get to the X.Y formatting and information that gets me the changing start point, but not ways to use both in context of a multi-level list.



I can almost make this work using the below code snippet:



<style>
OL counter-reset: item 3
LI display: block
LI:before content: counters(item, ".") " "; counter-increment: item
</style>
<ol>
<li><strong>Instruction 4</strong></li>
<li><strong>Instruction 5:</strong></li><strong>
<ol>
<li>Sub-item 1</li>
<li>Sub-item 2</li>
<li>Sub-item 3</li>
</ol>

</strong></ol>


Instead of:
4. Instruction item 4
5. Instruction item 5
5.1 Sub-instruction 1
5.2 Sub-instruction 2
5.3 Sub-instruction 3



the above code section currently gives me:



4 Item 4
5 Item 5
5.4 Sub Item 1
5.5 Sub Item 2
5.6 Sub Item 3


If I substitute "counter-reset: item" for "counter-reset: item 3" I instead get:



1. Instruction item 4
2. Instruction item 5
2.1 Sub-instruction 1
2.2 Sub-instruction 2
2.3 Sub-instruction 3


Push comes to shove I could use separate lines of text and the appropriate line padding to get the desired effect (or try to change the graphics), but ideally I'd like to find a way to get the list to automatically format appropriately so we can use this for future lessons. Any assistance to help with where I'm going wrong would be greatly appreciated.










share|improve this question






























    0















    I'm currently working on a project converting some training materials from one e-learning system to another, and I'm trying to preserve original formatting where I can (especially when lists tie into images), and this has involved picking up some HTML/CSS commands to help recreate formatting (I'm keeping notes for my colleagues on functions that I'm using so they can also understand it).



    In the current lesson, the list of instructions I'm working with is spreading over multiple "cards." I've mostly been able to make this work, but the current card has a graphic tie-in that I'm having some difficulty puzzling out.



    What I'm trying to do on this card:



    4. Instruction item 4
    5. Instruction item 5
    5.1 Sub-instruction 1
    5.2 Sub-instruction 2
    5.3 Sub-instruction 3

    Graphic referenced by above

    6. Instruction item 6


    etc.



    The current code sections that I'm finding are not quite getting to that result, though.



    I've been researching online (including here), and I'm finding information that helps me get to the X.Y formatting and information that gets me the changing start point, but not ways to use both in context of a multi-level list.



    I can almost make this work using the below code snippet:



    <style>
    OL counter-reset: item 3
    LI display: block
    LI:before content: counters(item, ".") " "; counter-increment: item
    </style>
    <ol>
    <li><strong>Instruction 4</strong></li>
    <li><strong>Instruction 5:</strong></li><strong>
    <ol>
    <li>Sub-item 1</li>
    <li>Sub-item 2</li>
    <li>Sub-item 3</li>
    </ol>

    </strong></ol>


    Instead of:
    4. Instruction item 4
    5. Instruction item 5
    5.1 Sub-instruction 1
    5.2 Sub-instruction 2
    5.3 Sub-instruction 3



    the above code section currently gives me:



    4 Item 4
    5 Item 5
    5.4 Sub Item 1
    5.5 Sub Item 2
    5.6 Sub Item 3


    If I substitute "counter-reset: item" for "counter-reset: item 3" I instead get:



    1. Instruction item 4
    2. Instruction item 5
    2.1 Sub-instruction 1
    2.2 Sub-instruction 2
    2.3 Sub-instruction 3


    Push comes to shove I could use separate lines of text and the appropriate line padding to get the desired effect (or try to change the graphics), but ideally I'd like to find a way to get the list to automatically format appropriately so we can use this for future lessons. Any assistance to help with where I'm going wrong would be greatly appreciated.










    share|improve this question


























      0












      0








      0








      I'm currently working on a project converting some training materials from one e-learning system to another, and I'm trying to preserve original formatting where I can (especially when lists tie into images), and this has involved picking up some HTML/CSS commands to help recreate formatting (I'm keeping notes for my colleagues on functions that I'm using so they can also understand it).



      In the current lesson, the list of instructions I'm working with is spreading over multiple "cards." I've mostly been able to make this work, but the current card has a graphic tie-in that I'm having some difficulty puzzling out.



      What I'm trying to do on this card:



      4. Instruction item 4
      5. Instruction item 5
      5.1 Sub-instruction 1
      5.2 Sub-instruction 2
      5.3 Sub-instruction 3

      Graphic referenced by above

      6. Instruction item 6


      etc.



      The current code sections that I'm finding are not quite getting to that result, though.



      I've been researching online (including here), and I'm finding information that helps me get to the X.Y formatting and information that gets me the changing start point, but not ways to use both in context of a multi-level list.



      I can almost make this work using the below code snippet:



      <style>
      OL counter-reset: item 3
      LI display: block
      LI:before content: counters(item, ".") " "; counter-increment: item
      </style>
      <ol>
      <li><strong>Instruction 4</strong></li>
      <li><strong>Instruction 5:</strong></li><strong>
      <ol>
      <li>Sub-item 1</li>
      <li>Sub-item 2</li>
      <li>Sub-item 3</li>
      </ol>

      </strong></ol>


      Instead of:
      4. Instruction item 4
      5. Instruction item 5
      5.1 Sub-instruction 1
      5.2 Sub-instruction 2
      5.3 Sub-instruction 3



      the above code section currently gives me:



      4 Item 4
      5 Item 5
      5.4 Sub Item 1
      5.5 Sub Item 2
      5.6 Sub Item 3


      If I substitute "counter-reset: item" for "counter-reset: item 3" I instead get:



      1. Instruction item 4
      2. Instruction item 5
      2.1 Sub-instruction 1
      2.2 Sub-instruction 2
      2.3 Sub-instruction 3


      Push comes to shove I could use separate lines of text and the appropriate line padding to get the desired effect (or try to change the graphics), but ideally I'd like to find a way to get the list to automatically format appropriately so we can use this for future lessons. Any assistance to help with where I'm going wrong would be greatly appreciated.










      share|improve this question
















      I'm currently working on a project converting some training materials from one e-learning system to another, and I'm trying to preserve original formatting where I can (especially when lists tie into images), and this has involved picking up some HTML/CSS commands to help recreate formatting (I'm keeping notes for my colleagues on functions that I'm using so they can also understand it).



      In the current lesson, the list of instructions I'm working with is spreading over multiple "cards." I've mostly been able to make this work, but the current card has a graphic tie-in that I'm having some difficulty puzzling out.



      What I'm trying to do on this card:



      4. Instruction item 4
      5. Instruction item 5
      5.1 Sub-instruction 1
      5.2 Sub-instruction 2
      5.3 Sub-instruction 3

      Graphic referenced by above

      6. Instruction item 6


      etc.



      The current code sections that I'm finding are not quite getting to that result, though.



      I've been researching online (including here), and I'm finding information that helps me get to the X.Y formatting and information that gets me the changing start point, but not ways to use both in context of a multi-level list.



      I can almost make this work using the below code snippet:



      <style>
      OL counter-reset: item 3
      LI display: block
      LI:before content: counters(item, ".") " "; counter-increment: item
      </style>
      <ol>
      <li><strong>Instruction 4</strong></li>
      <li><strong>Instruction 5:</strong></li><strong>
      <ol>
      <li>Sub-item 1</li>
      <li>Sub-item 2</li>
      <li>Sub-item 3</li>
      </ol>

      </strong></ol>


      Instead of:
      4. Instruction item 4
      5. Instruction item 5
      5.1 Sub-instruction 1
      5.2 Sub-instruction 2
      5.3 Sub-instruction 3



      the above code section currently gives me:



      4 Item 4
      5 Item 5
      5.4 Sub Item 1
      5.5 Sub Item 2
      5.6 Sub Item 3


      If I substitute "counter-reset: item" for "counter-reset: item 3" I instead get:



      1. Instruction item 4
      2. Instruction item 5
      2.1 Sub-instruction 1
      2.2 Sub-instruction 2
      2.3 Sub-instruction 3


      Push comes to shove I could use separate lines of text and the appropriate line padding to get the desired effect (or try to change the graphics), but ideally I'd like to find a way to get the list to automatically format appropriately so we can use this for future lessons. Any assistance to help with where I'm going wrong would be greatly appreciated.







      html css html-lists






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 22 at 18:43









      David Thomas

      206k38303355




      206k38303355










      asked Mar 22 at 18:30









      JoshJosh

      31




      31






















          2 Answers
          2






          active

          oldest

          votes


















          0














          First of all, you should have your nested ol in a li.

          The only allowed children of an ol are li.



          Now, let's see what you can do with a second counter:






          ol counter-reset: item 3
          li display: block
          ol > li:before
          content: counters(item, "") " ";
          counter-increment: item

          ol ol
          counter-reset: tata 0; /* Second counter */

          ol ol li:before
          content: counters(item, "") "." counters(tata, "") " ";
          counter-increment: tata;

          <ol>
          <li><strong>Instruction 1</strong></li>
          <li>
          <strong>Instruction 2:</strong>
          <strong>
          <ol>
          <li>Sub-item 1</li>
          <li>Sub-item 2</li>
          <li>Sub-item 3</li>
          </ol>
          </strong>
          </li>
          </ol>








          share|improve this answer
































            0














            Counters are confusing pains, but I've sorted it out for you:



            CSS



            body 
            counter-reset: section;

            ol
            counter-reset: section +3;
            list-style-type: none;

            li.heading::before
            counter-increment: section;
            content: counter(section) '. ';

            ol.sub-heading-wrapper
            counter-reset: subheading;

            li.sub-heading::before
            counter-increment: subheading;
            content: counter(section) "." counter(subheading) " ";



            HTML



            <ol>
            <li class="heading"><strong>Instruction 4</strong></li>
            <li class="heading"><strong>Instruction 5:</strong>
            <ol class="sub-heading-wrapper">
            <li class="sub-heading">Sub-item 1</li>
            <li class="sub-heading">Sub-item 2</li>
            <li class="sub-heading">Sub-item 3</li>
            </ol>
            </li>
            <li class="heading"><strong>Instruction 6:</strong>
            <ol class="sub-heading-wrapper">
            <li class="sub-heading">Sub-item 1</li>
            <li class="sub-heading">Sub-item 2</li>
            <li class="sub-heading">Sub-item 3</li>
            </ol>
            </li>
            </ol>


            Basically, I create two counters. One is reset at the top of the HTML page. The second one resets for every "sub-heading-wrapper" class. Then they just increment and get squished together appropriately.






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55305825%2fis-there-a-way-to-change-start-numbers-within-a-multi-level-list-after-having-al%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              First of all, you should have your nested ol in a li.

              The only allowed children of an ol are li.



              Now, let's see what you can do with a second counter:






              ol counter-reset: item 3
              li display: block
              ol > li:before
              content: counters(item, "") " ";
              counter-increment: item

              ol ol
              counter-reset: tata 0; /* Second counter */

              ol ol li:before
              content: counters(item, "") "." counters(tata, "") " ";
              counter-increment: tata;

              <ol>
              <li><strong>Instruction 1</strong></li>
              <li>
              <strong>Instruction 2:</strong>
              <strong>
              <ol>
              <li>Sub-item 1</li>
              <li>Sub-item 2</li>
              <li>Sub-item 3</li>
              </ol>
              </strong>
              </li>
              </ol>








              share|improve this answer





























                0














                First of all, you should have your nested ol in a li.

                The only allowed children of an ol are li.



                Now, let's see what you can do with a second counter:






                ol counter-reset: item 3
                li display: block
                ol > li:before
                content: counters(item, "") " ";
                counter-increment: item

                ol ol
                counter-reset: tata 0; /* Second counter */

                ol ol li:before
                content: counters(item, "") "." counters(tata, "") " ";
                counter-increment: tata;

                <ol>
                <li><strong>Instruction 1</strong></li>
                <li>
                <strong>Instruction 2:</strong>
                <strong>
                <ol>
                <li>Sub-item 1</li>
                <li>Sub-item 2</li>
                <li>Sub-item 3</li>
                </ol>
                </strong>
                </li>
                </ol>








                share|improve this answer



























                  0












                  0








                  0







                  First of all, you should have your nested ol in a li.

                  The only allowed children of an ol are li.



                  Now, let's see what you can do with a second counter:






                  ol counter-reset: item 3
                  li display: block
                  ol > li:before
                  content: counters(item, "") " ";
                  counter-increment: item

                  ol ol
                  counter-reset: tata 0; /* Second counter */

                  ol ol li:before
                  content: counters(item, "") "." counters(tata, "") " ";
                  counter-increment: tata;

                  <ol>
                  <li><strong>Instruction 1</strong></li>
                  <li>
                  <strong>Instruction 2:</strong>
                  <strong>
                  <ol>
                  <li>Sub-item 1</li>
                  <li>Sub-item 2</li>
                  <li>Sub-item 3</li>
                  </ol>
                  </strong>
                  </li>
                  </ol>








                  share|improve this answer















                  First of all, you should have your nested ol in a li.

                  The only allowed children of an ol are li.



                  Now, let's see what you can do with a second counter:






                  ol counter-reset: item 3
                  li display: block
                  ol > li:before
                  content: counters(item, "") " ";
                  counter-increment: item

                  ol ol
                  counter-reset: tata 0; /* Second counter */

                  ol ol li:before
                  content: counters(item, "") "." counters(tata, "") " ";
                  counter-increment: tata;

                  <ol>
                  <li><strong>Instruction 1</strong></li>
                  <li>
                  <strong>Instruction 2:</strong>
                  <strong>
                  <ol>
                  <li>Sub-item 1</li>
                  <li>Sub-item 2</li>
                  <li>Sub-item 3</li>
                  </ol>
                  </strong>
                  </li>
                  </ol>








                  ol counter-reset: item 3
                  li display: block
                  ol > li:before
                  content: counters(item, "") " ";
                  counter-increment: item

                  ol ol
                  counter-reset: tata 0; /* Second counter */

                  ol ol li:before
                  content: counters(item, "") "." counters(tata, "") " ";
                  counter-increment: tata;

                  <ol>
                  <li><strong>Instruction 1</strong></li>
                  <li>
                  <strong>Instruction 2:</strong>
                  <strong>
                  <ol>
                  <li>Sub-item 1</li>
                  <li>Sub-item 2</li>
                  <li>Sub-item 3</li>
                  </ol>
                  </strong>
                  </li>
                  </ol>





                  ol counter-reset: item 3
                  li display: block
                  ol > li:before
                  content: counters(item, "") " ";
                  counter-increment: item

                  ol ol
                  counter-reset: tata 0; /* Second counter */

                  ol ol li:before
                  content: counters(item, "") "." counters(tata, "") " ";
                  counter-increment: tata;

                  <ol>
                  <li><strong>Instruction 1</strong></li>
                  <li>
                  <strong>Instruction 2:</strong>
                  <strong>
                  <ol>
                  <li>Sub-item 1</li>
                  <li>Sub-item 2</li>
                  <li>Sub-item 3</li>
                  </ol>
                  </strong>
                  </li>
                  </ol>






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Mar 22 at 19:03

























                  answered Mar 22 at 18:53









                  Amaury HanserAmaury Hanser

                  755516




                  755516























                      0














                      Counters are confusing pains, but I've sorted it out for you:



                      CSS



                      body 
                      counter-reset: section;

                      ol
                      counter-reset: section +3;
                      list-style-type: none;

                      li.heading::before
                      counter-increment: section;
                      content: counter(section) '. ';

                      ol.sub-heading-wrapper
                      counter-reset: subheading;

                      li.sub-heading::before
                      counter-increment: subheading;
                      content: counter(section) "." counter(subheading) " ";



                      HTML



                      <ol>
                      <li class="heading"><strong>Instruction 4</strong></li>
                      <li class="heading"><strong>Instruction 5:</strong>
                      <ol class="sub-heading-wrapper">
                      <li class="sub-heading">Sub-item 1</li>
                      <li class="sub-heading">Sub-item 2</li>
                      <li class="sub-heading">Sub-item 3</li>
                      </ol>
                      </li>
                      <li class="heading"><strong>Instruction 6:</strong>
                      <ol class="sub-heading-wrapper">
                      <li class="sub-heading">Sub-item 1</li>
                      <li class="sub-heading">Sub-item 2</li>
                      <li class="sub-heading">Sub-item 3</li>
                      </ol>
                      </li>
                      </ol>


                      Basically, I create two counters. One is reset at the top of the HTML page. The second one resets for every "sub-heading-wrapper" class. Then they just increment and get squished together appropriately.






                      share|improve this answer



























                        0














                        Counters are confusing pains, but I've sorted it out for you:



                        CSS



                        body 
                        counter-reset: section;

                        ol
                        counter-reset: section +3;
                        list-style-type: none;

                        li.heading::before
                        counter-increment: section;
                        content: counter(section) '. ';

                        ol.sub-heading-wrapper
                        counter-reset: subheading;

                        li.sub-heading::before
                        counter-increment: subheading;
                        content: counter(section) "." counter(subheading) " ";



                        HTML



                        <ol>
                        <li class="heading"><strong>Instruction 4</strong></li>
                        <li class="heading"><strong>Instruction 5:</strong>
                        <ol class="sub-heading-wrapper">
                        <li class="sub-heading">Sub-item 1</li>
                        <li class="sub-heading">Sub-item 2</li>
                        <li class="sub-heading">Sub-item 3</li>
                        </ol>
                        </li>
                        <li class="heading"><strong>Instruction 6:</strong>
                        <ol class="sub-heading-wrapper">
                        <li class="sub-heading">Sub-item 1</li>
                        <li class="sub-heading">Sub-item 2</li>
                        <li class="sub-heading">Sub-item 3</li>
                        </ol>
                        </li>
                        </ol>


                        Basically, I create two counters. One is reset at the top of the HTML page. The second one resets for every "sub-heading-wrapper" class. Then they just increment and get squished together appropriately.






                        share|improve this answer

























                          0












                          0








                          0







                          Counters are confusing pains, but I've sorted it out for you:



                          CSS



                          body 
                          counter-reset: section;

                          ol
                          counter-reset: section +3;
                          list-style-type: none;

                          li.heading::before
                          counter-increment: section;
                          content: counter(section) '. ';

                          ol.sub-heading-wrapper
                          counter-reset: subheading;

                          li.sub-heading::before
                          counter-increment: subheading;
                          content: counter(section) "." counter(subheading) " ";



                          HTML



                          <ol>
                          <li class="heading"><strong>Instruction 4</strong></li>
                          <li class="heading"><strong>Instruction 5:</strong>
                          <ol class="sub-heading-wrapper">
                          <li class="sub-heading">Sub-item 1</li>
                          <li class="sub-heading">Sub-item 2</li>
                          <li class="sub-heading">Sub-item 3</li>
                          </ol>
                          </li>
                          <li class="heading"><strong>Instruction 6:</strong>
                          <ol class="sub-heading-wrapper">
                          <li class="sub-heading">Sub-item 1</li>
                          <li class="sub-heading">Sub-item 2</li>
                          <li class="sub-heading">Sub-item 3</li>
                          </ol>
                          </li>
                          </ol>


                          Basically, I create two counters. One is reset at the top of the HTML page. The second one resets for every "sub-heading-wrapper" class. Then they just increment and get squished together appropriately.






                          share|improve this answer













                          Counters are confusing pains, but I've sorted it out for you:



                          CSS



                          body 
                          counter-reset: section;

                          ol
                          counter-reset: section +3;
                          list-style-type: none;

                          li.heading::before
                          counter-increment: section;
                          content: counter(section) '. ';

                          ol.sub-heading-wrapper
                          counter-reset: subheading;

                          li.sub-heading::before
                          counter-increment: subheading;
                          content: counter(section) "." counter(subheading) " ";



                          HTML



                          <ol>
                          <li class="heading"><strong>Instruction 4</strong></li>
                          <li class="heading"><strong>Instruction 5:</strong>
                          <ol class="sub-heading-wrapper">
                          <li class="sub-heading">Sub-item 1</li>
                          <li class="sub-heading">Sub-item 2</li>
                          <li class="sub-heading">Sub-item 3</li>
                          </ol>
                          </li>
                          <li class="heading"><strong>Instruction 6:</strong>
                          <ol class="sub-heading-wrapper">
                          <li class="sub-heading">Sub-item 1</li>
                          <li class="sub-heading">Sub-item 2</li>
                          <li class="sub-heading">Sub-item 3</li>
                          </ol>
                          </li>
                          </ol>


                          Basically, I create two counters. One is reset at the top of the HTML page. The second one resets for every "sub-heading-wrapper" class. Then they just increment and get squished together appropriately.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 22 at 18:52









                          Veridian DynamicsVeridian Dynamics

                          945313




                          945313



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55305825%2fis-there-a-way-to-change-start-numbers-within-a-multi-level-list-after-having-al%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                              용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

                              155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해