2017-05-22 4 views
-3

Bitte helfen, ich habe eine Liste und den Moment, wenn ich die Absätze länger machen die Zuordnung ist nicht ordentlich, und sieht schrecklich aus. Ich brauche 1.1 beispielsweise einrücken und ordentlich mit dem Rest ...Zuordnung Absätze in der Liste html/css

ol { 
 
    list-style-type: none; 
 
    counter-reset: item; 
 
    margin: 0; 
 
    padding: 0; 
 
} 
 

 
li { 
 
    display: table-row; 
 
    counter-increment: item; 
 
    margin-bottom: 0.6em; 
 
} 
 

 
li:before { 
 
    content: counters(item, ".") ". "; 
 
    display: inline-block; 
 
    margin: 0; 
 
    width: 40px; 
 
} 
 

 
li li { 
 
    margin: 0; 
 
}
<ol> 
 

 
<li><strong>Introduction</strong> 
 
    <ol> 
 
     <li>This document serves as an annexure to the Standard Terms and Conditions 
 
and its sole purpose is to set out the specific conditions applicable to the type 
 
of Finance Product you have selected to finance your Vehicle ("Annexure A").</li> 
 
     <li>Ullamco laboris nisi ut. 
 
      <ol> 
 
       <li>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
 
       </li> 
 
      </ol> 
 
     </li> 
 
    </ol> 
 
</li> 
 

 
<li><strong>Heading 2 </strong> 
 
    <ol> 
 
     <li>This document serves as an annexure to the Standard Terms and Conditions 
 
and its sole purpose is to set out the specific conditions applicable to the type 
 
of Finance Product you have selected to finance your Vehicle ("Annexure A").</li> 
 
     <li>Ullamco laboris nisi ut. 
 
      <ol> 
 
       <li>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
 
        
 
        <ol> 
 
        <li> Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur..</li> 
 
        </ol> 
 
       </li> 
 
      </ol> 
 
     </li> 
 
    </ol> 
 
</li> 
 

 
</ol>

+1

Mögliche Duplikate von [Entfernen von ul Einzug mit CSS] (https://StackOverflow.com/Questions/9620594/removing-ul-indent-with-Css) – Rob

Antwort

0
ol>li>ol>li li:before { 
    display: table-cell; 
} 

Dies ist die Ursache des Problems, entfernen Sie diese und alle Arbeiten in einer Reihe aufstellen.

+0

Danke ok Ich habe das entfernt, aber schauen, was passiert, wenn Sie machen der Text in der Liste verteilt länger, dann ist es nicht ordentlich zugeordnet ... –