views:

25

answers:

2

Hi,

So I got some divs... The aim here is to play with some hide-show effects.

<div class="container">
    <div class="move">
        Some dynamic content...
    </div>
</div>



.container {
    width:100px;
    height:100%;
    owerflow-y:hidden;
}


.move {
    width:300px;
    height:100%;
    float:right;
}

The issue is that in ie7 the float right doesn't work. the .move div will stick left.
Is there any way to fix this ?

Thanks.

A: 

It is because your containers width is less than the contents.

ifyou choose the width of .container bigger, you'll see the effekt is working. If you want the .move to be in the container by DOM-Tree but not on the screen, use position: absolute.

helle
It works with position: absolute indeed. But then my element is out of the flow, and its parent can't take its height. I know using JS I could fix that but the less I cheat, the better it is ;) Thx anyway
mrpx
A: 

You can use text-align:right instead of float:right with your current widths(Inner DIV with More than the Outer DIV width).

Multiplexer