HTML list for terms and rules

twollert

Active member
I would like to use a html list in the phrase "terms_rules_text". Like that:

<ol type="a">
<li>rule 1</li>
<li>rule 2</li>
<li>rule 3</li>
</ol>

But XenForo ignores the "type" attribute.

So instead of

a. rule 1
b. rule 2
c. rule 3

I always get

1. rule 1
2. rule 2
3. rule 3

What is the reason for that?
 
OL = Ordered list.
UL = unordered list.

[edit]
Oops, it submitted the post, but for some reason the rest wasn't included.
Now I have to type it again.

type attribute is deprecated in html 4, but legacy support for html5 is there as far as I know
so you have to do this with css now (best pract.)

HTML:
ul[type="disc"] { list-style-type: disc; }
ul[type="circle"] { list-style-type: circle; }
ul[type="square"] { list-style-type: square; }
 
ol[type="1"] { list-style-type: decimal; }
ol[type="a"] { list-style-type: lower-alpha; }
ol[type="A"] { list-style-type: upper-alpha; }
ol[type="i"] { list-style-type: lower-roman; }
ol[type="I"] { list-style-type: upper-roman; }

http://www.w3.org/TR/css3-lists/
http://www.w3schools.com/css/css_list.asp
 
It should be parsing it as regular HTML.

Try this?

Code:
<style>
ol {
list-style-type:lower-alpha;
}
</style>
<ol>
<li>rule 1</li>
<li>rule 2</li>
<li>rule 3</li>
</ol>
 
type attribute is deprecated in html 4, but legacy support for html5 is there as far as I know

Thanks for that info, I didn't know that.

I tried

Code:
<ol style="list-style-type: upper-alpha">
<li>rule 1</li>
<li>rule 2</li>
<li>rule 3</li>
</ol>

and Mikey's suggestion, but I always get 1., 2., 3. instead of a., b.,c.. :cry:
 
Sorry to brutally necropost, but I was wondering if this issue has been resolved. I currently have the exact same problem, I want to make my OL list have letters instead of numbers.
 
You could add a style-tag above the rules, like this:
HTML:
<style>
.baseHtml ol li {
    list-style-type: upper-alpha;
    font-weight: bold;
}
 
.baseHtml ol ol li {
    list-style-type: lower-alpha;
    font-weight: normal;
}
</style>
 
 
<ol>
    <li>Chapter 1
        <ol>
            <li>Rule 1</li>
            <li>Rule 2</li>
            <li>Rule 3</li>
        </ol>
    </li>
    <li>Chapter 2
        <ol>
            <li>Rule 1</li>
            <li>Rule 2</li>
            <li>Rule 3</li>
        </ol>
    </li>
    <li>Chapter 3
        <ol>
            <li>Rule 1</li>
            <li>Rule 2</li>
            <li>Rule 3</li>
        </ol>
    </li>
</ol>
 
Top Bottom