Reputation: 22956
I'm trying to make a slider with width: 100%
of the parent.
Here is a working demo.
.moving_container ul li {
/*width: 100%;*/
width: 500px;
height: 300px;
list-style: none;
float: left;
position: relative;
display: block;
/* background-repeat: no-repeat;
background-size: 100%;*/
}
It's working fine now. When i set width 100%, I am not getting the slider view as in width 500px. What is the correct property so that this slider works in all the sized windows.
I just played with background-properties. Unfortunately I din't get it.
Any Suggestions?
Upvotes: 2
Views: 101
Reputation: 294
Add this on top of your JS Function:
$('.moving_container li').width($(window).width());
Upvotes: 3