this is the slider i’m trying to modify:
http://webkunst.comeze.com/
And this is the overflow with border that I want to achieve:

The problem is that I have tried everything to make the image work with the container overflow:hidden but it’s not possible, I have tried with position relative, of all the container divs and so on.
Can someone help me out? The transparent border aren’t a must but the most important thing is to get the overflow hidden work with the borders.
This is the markup:
<div id="home_slider">
<ul id="slides">
<li class="home_slide"><img src="images/slide1.jpg" alt=""></li>
<li class="home_slide"><img src="images/slide2.jpg" alt=""></li>
<li class="home_slide"><img src="images/slide3.jpg" alt=""></li>
<li class="home_slide"><img src="images/slide4.jpg" alt=""></li>
</ul>
</div>
and CSS:
#home_slider {
margin: 0 auto;
width: 880px;
height: 416px;
position: relative;
z-index: 5;
overflow: hidden;
}
#home_slider ul#slides {
list-style: none;
position: relative;
overflow: hidden;
border-radius: 20px;
}
#home_slider ul#slides li {
margin: 0;
width: 900px;
height: 416px;
}
.home_box {
margin-top: 30px;
float: right;
}
.home_box .home_image {
float: left;
border: 3px solid #6f6f6f;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
overflow: hidden;
margin-left: 13px;
}
I got the slider from this tutorial:
http://line25.com/tutorials/build-a-simple-image-slideshow-with-jquery-cycle
You just need to apply the
border-radiusto the#home_sliderdiv instead of#home_slider ul#slides. For the transparent border, you can use rgba and you will need to apply it to#home_slideras well:EDIT : It seems Chrome cannot clip contents to a
border-radiuswhen the elements are notposition:static. However, if you can live without the transparent border then you can add this to the same rule above to get the rounded corners, but you must remove the border: