2

I built a carousel with the following design: http://jsfiddle.net/nj3xf/13/

Why is the div leaking through? Can somebody explain? and possibly offer a fix? I know it may have to do with the overflow:hidden

Vijay Verma
  • 3,660
  • 2
  • 19
  • 27
foklepoint
  • 2,231
  • 2
  • 16
  • 15

2 Answers2

2

Rendering round corners over CSS animations is buggy. A safe workaround is to animate the slides yourself.

See updated fiddle: http://jsfiddle.net/nj3xf/18/

$("#move").click(function () {
    $('.slider').animate({left: "-=104px"});
});

Edit: Improved example: http://jsfiddle.net/nj3xf/19/. Avoid display:inline-block because it adds some unwanted margin between the slider items. See display: inline-block extra margin and Unwanted margin in inline-block list items for more info.

Community
  • 1
  • 1
cherouvim
  • 31,725
  • 15
  • 104
  • 153
0

You can minimize the bugginess if you set the containers to a higher z-index than the child div. It still affects the border property slightly, but it's much less noticeable.

jdeut
  • 19
  • 4