0

I wanted to create multilevel ordered list in SharePoint 2013 Content Editor, with continuous counting, including numbers from upper levels.

1. Planes 
2. Cars 
  2.1. Ferrari 
  2.2. BMW 
3. Trains

Is there a way to set numbering automatically without typing each list number value by hand?

3
  • It is not related to SharePoint but HTML/CSS. If you can do it HTML it can be done in SharePoint too. So, you should add tag HTML and CSS to question Jul 9 '15 at 14:18
  • Tags are added. I was thinking if SharePoint has some built in functionality that does that kind of numbering.. Jul 9 '15 at 14:22
  • I agree with @JayHell approach. You should research more CSS custom numbering style and you can achieve your goal. Jul 10 '15 at 4:07
0

This is more a question about HTML than SharePoint. Edit the source code of your Content Editor WebPart and put this :

<style>
   .numbered-list { 
         counter-reset: item 
     }
   .numbered-list-item {
         display:block
     }
   .numbered-list-item:before { 
         content: counters(item, ".") ". "; 
         counter-increment: item 
     }
  </style> 
<ol class="numbered-list">
   <li class="numbered-list-item">Planes</li>
   <li class="numbered-list-item">Cars 
      <ol class="numbered-list"> 
         <li class="numbered-list-item">Ferrari </li>
         <li class="numbered-list-item">BMW </li>
      </ol>
   </li>
   <li class="numbered-list-item">Trains</li>
</ol>

http://www.w3schools.com/cssref/pr_gen_counter-increment.asp

EDIT : If you want to keep this user friendly, you can simply let the users create their Numbered list from the interface and target the css to the webpart only.

<style>
   #WebPartWPQ2 ol{ 
         counter-reset: item 
     }
    #WebPartWPQ2 li{
         display:block
     }
   #WebPartWPQ2 li:before { 
         content: counters(item, ".") ". "; 
         counter-increment: item 
     }
  </style> 
2
  • Thank you for answer, but this was not what I was looking for.. But I might consider using your code, so - thank you. Jul 9 '15 at 14:47
  • 1
    Edited my answer, but in short, I don't think there is a way to achieve this in SharePoint without using CSS.
    – JayHell
    Jul 9 '15 at 15:10
-1

It's answer can be quite little bit easy .You have done a great job but it can be more easy . Inspite of using numbered list again and again we can simply write the "ol type" instead of writing number list and can start our ordered list coding. Now moving further we will write LI tag and the content in it the we will simply close it.In this way we can easily create the ordered list

1
  • If you may have query you all can ask me.And if you all are satisfied with the answer so please give your suggestions Sep 18 '18 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.