jcarousel with 100% li item width?
I'm trying to get jcarousel to work with an li width of 100%. i.e.
whatever width the browser window has, that's the width of the visible li
item.
When I make the ul wide enough for all the items (20000em like the demo)
and set the li width to 100%, naturally it becomes 20000em too, where as I
want it the width of the container
#slider {
height:500px;
position:relative;
overflow:hidden;
width:100%;
}
#slider ul {
height:500px;
list-style:none;
list-style-type:none;
position:absolute;
width:20000em;
}
#slider ul li {
height:500px;
width:100%;
float:left;
}
// HTML
<div id="slider">
<ul>
<li>As wide as the window, not 20000em like the parent ul</li>
</ul>
</div>
No comments:
Post a Comment