views:

18

answers:

1

Hello all,

For few days i'm looking for a good solution for my problem, but with no success.

Here is my code:

<ul style="list-style: none; position: relative;">
    <li style="float: left;"><span style="position: relative; left: 5px; ">one</span></li>
    <li style="float: left;"><span>two</span></li>
    <li style="float: left;"><span>three</span></li>
</ul>

All li elements contain a span, but the first one is the only different one, which is relatively positioned.

All browsers are fine with this, but only IE6\7 causing the first span to disappear - and this is my problem.

Hope that I was clear enough, and that my english is enough readable.

Thanks all.

A: 

If you must require the position relatives, change float to inline-block. The float is a factor in this as well.

http://jsfiddle.net/zRYqh/5/

meder
Hey meder, thanks for the answer. when i change it to inline-block then i actually loose the float, and the li elements wont come in one line, but in three lines. isn't there any solution to keep the floats and go above this bug ?
Gal V
@Gal V - inline-block would you give you the same effect. Make sure you are including the `display:inline` IE `<style>` conditional that I have. If that doesn't do it, please paste the full code.
meder