Site logo

anythingslider margin

By April 3, 2012 Web Developer Tutorials

We love using anythingslider on our projects. Pull in its js and easing.js and you are off and running with a quick call under document.ready.

The Dilema

Recently we had an issue where the image was not centered in the slider. It was about 30 px to the right. I mean, you could see the edge of the previous slide making it look cut off. The measurments were all correct. The panels were the same size as the window and anythingslider div. For at least an hour, we poked around firebug and google searches with no real solution. Then finally we found the answer buried in chatter on a forum

The solution

If you are encountering this issue, consider giving the “ul” element a width. In our case, it was taking the 100% width of its container which was 30px larger than the images.

Sign in

Sign Up

Forgot Password