Absolute position <span> in <li> - strange -

Posted by kevinius on Stack Overflow See other posts from Stack Overflow or by kevinius
Published on 2010-04-12T08:49:07Z Indexed on 2010/04/12 8:53 UTC
Read the original article Hit count: 211

Filed under:

Hi,

So i have a normal list

<ul class="test">
    <li><span><a href="">Gemeente</a><span></span></span></li>
    <li><span><a href="">Openingsuren</a><span></span></span></li>
    <li><span><a href="">Gezondheid</a><span></span></span></li>
</ul>

1: The second <span> is a 100x100 block background image.

2: The list is a normal bulleted list, not floated

3: The <ul> has position:relative, the <li> has not

4: The second <span> is set to position:absolute; top:0px; left:0px;


The problem

The second <span> gets positioned relative to the <li> dsf not the <ul>. Why is that?

© Stack Overflow or respective owner

Related posts about css-layout