javascript - Simple slider with width 100% -


i'm using simple slider plugin create ticker bar this:

enter image description here

and changes next slide:

enter image description here

it's "plugin" problem in case width of slider must 100% of screen (the plugin has fixed width of 500px):

http://codepen.io/zuraizm/pen/vgdhl

i tried adding width: 100% css slider, ul , li no luck:

    #slider {       position: relative;       overflow: hidden;       margin: 20px auto 0 auto;       border-radius: 4px;       width: 100% !important;     }      #slider ul {       position: relative;       margin: 0;       padding: 0;       height: 200px;       list-style: none;       width: 100% !important;     }      #slider ul li {       position: relative;       display: block;       float: left;       margin: 0;       padding: 0;       width: 500px;       height: 300px;       background: #ccc;       text-align: center;       line-height: 300px;       width: 100%;     } 

any ideas on how make work on width:100% example images?

the slider-elements needs width of 100%:

#slider {     width: 100%; } 

and also:

#slider ul li {     width: 100%; } 

do not assign width-value 2 times same element via css in entry-post. i've tried on fiddle , works.

edit:

and adjustments on js, in "fiddle" replace line 14-16 with:

$('#slider').css({ height: slideheight });  $('#slider ul').css({ width: sliderulwidth, height: slideheight });  $('#slider ul li').css({ width: slidewidth });  

http://codepen.io/anon/pen/vibhe


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -