CSS-Tricks / AnythingSlider

A jQuery Slider plugin for anything.
http://css-tricks.github.io/AnythingSlider/
GNU Lesser General Public License v3.0
1.15k stars 380 forks source link

The Expand option resize the slider: why? I want a fitting precision #583

Closed vito80ba closed 9 years ago

vito80ba commented 11 years ago

Hi, I've a simple slider in a div with a width 600px. If I set the "expand" option "true" I obtain a slider with a 510px width. How obtain a fitting-perfect slider?

I try also to hide the back-next arrows.

Vito

Mottie commented 11 years ago

Hi @vito80ba!

The reason the expand option makes the slider smaller is actually because of the back & next arrows. For example, if you are using the metallic theme, the outer wrapper adds padding to allow the arrows to overhang outside of the slider, making the slider panels smaller:

/* Overall Wrapper */
.anythingSlider-metallic {
    margin: 0 auto;
    /* 23px right & left padding for the navigation arrows */
    padding: 0 23px;
}

Just remove that padding and the slider will fill the entire width of it's container. You don't really need the expand option unless you want to make the slider responsive.