I'm generating an HTML document and I'm using CSS to number paragraphs this way:
p.numerado:before {
content: counter(numerado) ". ";
counter-increment: numerado;
display: inline-block;
width: 25mm;
font-weight: normal;
}
p.numerado {
text-indent: 0mm;
text-align: justify;
font-family: "Times New Roman, Times, serif";
font-size: 11pt;
margin-top: 0;
margin-bottom: 0.2em;
line-height: 1.2em;
font-weight: normal;
}
- EDIT: this is not a duplicate from :after and :before css pseudo elements hack for IE 7 because my problem involves paragraph numeration instead of image showing, plus I don't want to embed scripts in my HTML for it will cause its rejection by the webservice I'm going to submit it.
However, I need to show a preview of this inside a .NET WebBrowser control, which renders HTML in IE7 fashion, and then the styles above don't work, that is, the paragraphs with numerado
class aren't numbered neither indented.
Since the final destination of the HTML document is current Firefox, and I'm not willing to change Windows Registry just to modify WebBrowser control behavior, I'd like to know if there is an alternative CSS I can use, just for the sake of showing the preview inside WebBrowser with the closest as possible style of the final result, regarding to the numeration and indenting of those paragraphs.