0

I'm using a plugin that needs position:relative to animate the li items within a UL.

Here's a demo: http://jsfiddle.net/bleachie/aJPRp/

In IE7 overflow:hidden doesn't work but works if position:relative is removed from the UL; the plugin doesn't work then.

How would I fix this issue in IE7?.

Thanks.

CSS

ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.jSlots-wrapper {
    overflow: hidden;
    height: 20px;
    display: inline-block; /* to size correctly, can use float too, or width*/
    border: 1px solid #999;
}

.slot {
    float: left;
}

HTML

<ul class="slot">
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
    <li>6</li>
    <li>7</li>
</ul>
<input type="button" id="playNormal" value="play">​

Javascript

 $('.slot').jSlots({
     spinner : '#playNormal',
     winnerNumber : 7
 });
Ryan Lynch
  • 7,676
  • 1
  • 24
  • 33
user1381806
  • 509
  • 1
  • 5
  • 18

1 Answers1

0

A quick search turned up this question and answer. Basically, for overflow hidden to work with relatively positioned children in IE6/IE7, you need to position the container relatively as well. So in this case:

.jSlots-wrapper {
    position: relative;
    overflow: hidden;
    height: 20px;
    display: inline-block; /* to size correctly, can use float too, or width*/
    border: 1px solid #999;
}
Community
  • 1
  • 1
Ryan Lynch
  • 7,676
  • 1
  • 24
  • 33