Reputation: 2027
I am having trouble with OL and hebrew letters.
When trying to create an ordered list (<ol>
) with hebrew letters, when it comes to higher than ten items, the letters are reversed. As you can see here (chrome):
<ol style="list-style-type: hebrew; direction: rtl; text-align: right;">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li style="direction: rtl; list-style-type: hebrew;">14</li>
</ol>
For example, the 10th item, instead of יא is written אי, which is wrong. this is true for 12th, 13, 14 and so on...
Upvotes: 1
Views: 1900
Reputation: 29277
This isn't an "official" answer but a trick to get the same result with a different solution.
ol {
counter-reset: num;
direction: rtl;
}
li {
list-style-type: none;
counter-increment: num;
padding-bottom: 4px;
}
li:before {
content: '.' counter(num, hebrew);
padding-left: 10px;
unicode-bidi: bidi-override;
direction: ltr;
float: right;
}
<ol style="list-style-type: hebrew; direction: rtl;">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li>14</li>
</ol>
http://jsfiddle.net/moshfeu/pchady8e/1/
Thanks to @RC. for his answer (Custom <ol> numbering with Hebrew numerals)
Upvotes: 2