Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to align the numbers of an ordered list to right?

Consider code below:

<body>
 <ol style="text-align:right;">
  <li>Peach </li>
  <li>Banana</li>
 </ol>
</body>

In the output, The list items are indeed in the right, but the number are not. How to also align the number at the right position?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading