Reputation: 21
I am binding a decoded html consisting of list and text. But its failing to render bullets/numbers in case of OL LI/UL LI
Markup:
@HTML.Raw(httputlity.htmldecode(model.defn))
definition value after decoding will be
<ol><li>test</li><li>test2</li></ol>Sample text
Displayed as
test
test2
Sample Text
Must be displayed as
1. test
2. test2
Sample Text
test2
Upvotes: 1
Views: 1885
Reputation: 2638
It is simple, you have to write a CSS class for that OL tag
ol.yourOLCLASS
{
list-style-type:number;
}
Upvotes: 1
Reputation: 25705
the 1, 2 and the bullets are rendered by the browser parsing the <ul>
and <ol>
tags. They're not part of the HTML
Not too sure I understand your question though.
Upvotes: 1