hi peter,

in addition to Philippes explanation:

<div>
<img src="anyimage.jpg" width="250" height="100" style="float: left;
margin-right:2em;" />

<p>This is any text on the right side of the image</p>

<ul style="overflow:hidden; padding-left: 1em;">
<li>This is a list entry behaving badly</li>
<li>This is another list entry behaving badly</li>
</ul>
</div>

seems to work everywhere (i.e. XP, IE6, 7, Win7, Mac etc)

tina


> Von: Göldi <peter.goe...@gmail.com>
> Datum: Wed, 18 Mar 2009 09:15:01 +0100
> An: CSS-Discuss <css-d@lists.css-discuss.org>
> Betreff: [css-d]  ul, p after image floating left
> 
> Hi all
> 
> i have a question regarding behaviour of unordered lists beside a
> left-floating image compared to a another element like paragraph.
> 
> here is the code:
> 
> <div class="anyContainer">
> <img src="anyimage.jpg" style="float: left;"/>
> <p>This is any text on the right side of the image</p>
> <ul>
> <li>This is a list entry behaving badly</li>
> <li>This is another list entry behaving badly</li>
> </ul>
> </div>
> 
> this happens: the paragraph's text starts exactly after the image,
> same does the list's text, but not the bullets, they are *over* the
> image itself (hidden in ie7), and that's not what I want
> 
> 'workarounds':
> - "list-style-position: inside" moves the bullets out of the image,
> but i do not want inside bullets.
> - fiddling with margins: i could set left margin for the ul, but
> what's if there is an image with different width or no image at all?
> 
> i wonder why these lists are rendered as they are, because i can not
> imagine a case for which this behaviour is useful.
> 
> any help/good workarounds/comments appreciated!
> 
> thanks
> -peter
> ______________________________________________________________________
> 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/
> 


______________________________________________________________________
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/

Reply via email to