This is a follow-up to How to create a custom list style with a dash.
Specifically, my question concerns Internet Explorer 9. (Refer to my sample XHTML document at the end of this question. My sample document includes inline CSS.)
When I view my sample XHTML document as a local file, I see the expected result in IE9:
Here is a list:
- One
- Two
- Three
However, when I view this same XHTML document via IIS, I see something different in IE9:
Here is a list:
One
Two
Three
That is, IE9 is not rendering the dash that is intended to appear at the beginning of each list item.
(Note that Firefox 31 does render the dash when the file is viewed locally as well as via IIS.)
Could this problem be related to the HTTP headers being returned by IIS? Here are the key headers that my instance of IIS is returning:
200 OK
Date: Tue, 09 Sep 2014 18:41:34 GMT
Server: Microsoft-IIS/7.5
Content-Length: 706
Content-Type: text/html
Title: Custom List Item Test
X-Powered-By: ASP.NET
Sample XHTML document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Custom List Item Test</title>
<!-- https://stackoverflow.com/a/24279072/1497596 -->
<style type="text/css">
ul
{
list-style-type: none;
}
ul > li:before
{
content: "-";
position: absolute;
margin-left: -1.1em;
}
</style>
</head>
<body>
<h1>Here is a list:</h1>
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
</body>
</html>