vini
vini

Reputation: 4722

How to add border to carousel with two items

My code is as below

http://jsfiddle.net/gXN2u/219/

I am trying to add a border to each of the items with the class item-list. However it doesn't show.

My actual slider is a vertical slider.

What i want to achieve:

![enter image description here][1]

Please help

Upvotes: 0

Views: 2291

Answers (2)

Philip  Dernovoy
Philip Dernovoy

Reputation: 1179

Or, you can use overflow property

.item-list {
    border-top: 1px solid red;
    overflow: hidden;
}
.item-list:first-child {
    border-top: 0;
}

http://jsfiddle.net/ewygux9t/

Upvotes: 1

Karthi Keyan
Karthi Keyan

Reputation: 804

Just clear the float

 <div class="item-list clearfix">

add clear fix style in your style sheet

or add float and width for the .item-list

.item-list {
   border: 8px solid red;
   box-shadow: 0px 0px 0px 10px #888888;
   border-radius: 7px;
   -moz-border-radius: 7px;
   -webkit-border-radius: 7px;
   float: left;/*added*/
   width: 100%;/*added*/

}

Upvotes: 1

Related Questions