Reputation: 890
I am putting together a slideshow for a CMS, this slideshow has some tolerance for a range of image dimensions. Unfortunately I am unable to wrap all the images in a border.
See the image to better understand the problem.
Upvotes: 0
Views: 4480
Reputation: 726
Please check this, hope this will work for you.
.slider_container {
position: relative;
}
.slider_container img {
position: relative;
width: 100%;
}
.slider_container .border_box {
position: absolute;
border: 3px solid #fff;
left: 5px;
right: 5px;
top: 5px;
bottom: 10px;
}
<div class="slider_container">
<img src="http://www.electricprism.com/aeron/slideshow/images/1.jpg" alt="">
<div class="border_box"></div>
</div>
Upvotes: 2