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 Commented Jul 9, 2015 at 14:18
  • Tags are added. I was thinking if SharePoint has some built in functionality that does that kind of numbering.. Commented Jul 9, 2015 at 14:22
  • I agree with @JayHell approach. You should research more CSS custom numbering style and you can achieve your goal. Commented Jul 10, 2015 at 4:07

2 Answers 2

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. Commented Jul 9, 2015 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
    Commented Jul 9, 2015 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 Commented Sep 18, 2018 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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