Hi I have a problem with list formatting when list items contain named anchors, but only under the "loose" doctype in IE (I am using IE8).
This is my minimal example: --------- test.html: --------- <html> <head> <link href="test.css" type="text/css" rel="stylesheet"> </head> <body> <ol> <li> <a name="one" class="empty"></a> <p>One</p> </li> </ol> </body> -------- test.css: -------- ol { padding: 0 0 0 2em; margin-top: 1em; margin-bottom: 1em; } li { margin-top: 1em; margin-bottom: 1em; margin-left: 0.35em; padding-left: 0; list-style-type: decimal; } li:first-child { margin-top: 0; } a.empty { font-size: 0; line-height: 0; } p { margin-top: 1em; margin-bottom: 1em; } ------ Output: ------ 1. One However if I add the following line to the html file: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> then the output (using IE8) is no longer what I want, but appears on a broken line, viz.: -------------- "Loose" output: -------------- 1. One Unfortunately I need the loose doctype because of other document content not relevant to this example. Unfortunately I also have to use IE as the browser. Is there a way to style this HTML so as to see what I want when the HTML is declared as conforming to the loose.dtd doctype? Thanks Trevor ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/