views:

22

answers:

2

I've got a list with floated list items which should use the standard bullet. But in IE7 only, these bullets don't appear:

Here is the all the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>

<style type="text/css">
/*ul { overflow: hidden; margin: 1em; padding: 1em; } */
ul li
  { width: 30%;
    float: left;
    border: dashed red 1px;
/*  list-style-position: outside; list-style-type: disc; margin-left: 1em; padding: 1em; zoom: 1; */
    }
</style>

</head>

<body>

  <ul>
    <li>Lorem ipsum dolor sit </li>
    <li>consectetuer adipiscing elit</li>
    <li>Etiam sapien neque</li>
    <li>dictum at</li>
    <li>bibendum ut</li>
    <li>posuere quis</li>
  </ul>

</body>
</html>

The commented-out CSS are rules that I tried, but which didn't make the bullets appear.

When I remove the float: left; declaration, the bullets do appear in IE7.

How can I get floated lis with bullets to display in IE7?

+1  A: 

Further to my comment (to the question), a demo is posted over at JSBin.

With the following CSS seems to achieve your aims:

ul li {
float: left;
list-style-position: inside;
margin: 0 0 0 1em;
}
David Thomas
That code and JSBin demo displays the bullet in Firefox3, but not in IE7.
KatieK
@KatieK, *darn*, I'm not sure why that is, but I'll get back to you on that. :)
David Thomas
+1  A: 

I had to use a workaround to get the bullets to display in IE7. I created an image of the bullet, and set it as the background-image for the LIs, along with some extra padding.

I would be happy to accept another answer though! ;)

KatieK