Tips for aligning ordered list numbers to the right
P粉174151913
P粉174151913 2023-08-31 12:03:12
0
1
641
<p>Consider the following code:</p> <p>In the output, the list items are indeed on the right, but the numbers are not in the right position. How can I align the numbers to the right position as well? </p> <p> <pre class="brush:css;toolbar:false;">ol { width: 15vw; }</pre> <pre class="brush:html;toolbar:false;"><ol style="text-align:right;"> <li>Orange</li> <li>Apple</li> <li>Mango</li> <li>Pineapple</li> <li>Pear</li> <li>Grape</li> <li>Watermelon</li> <li>Strawberry</li> <li>Blueberry</li> <li>Raspberry</li> <li>Kiwi</li> </ol></pre> </p>
P粉174151913
P粉174151913

reply all(1)
P粉757432491

Add the rtl direction attribute to the ol tag: dir="rtl".

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template