tags:

views:

33

answers:

2

I observed a relative strange behavior when I use floating images in a document. The list items indentation is made relatively to the 'red line' instead of the 'green' one.

Why is this happening and can I solve this?

<img style="float: left">
<p>some text</p>
<ul>
   <li>aaa</li
   <li>bbb</li
</ul>
<p>some other text</p>

alt text

+2  A: 

I think you probably need to change the list style position to inside.

Skilldrick
+1  A: 

Just add ul { list-style-position: inside; } because by default it is set to outside, not sure why.

bogdan
Because the [W3C](http://www.w3.org/TR/CSS2/generate.html#list-style) says so?
Yi Jiang