CSS-Tricks / MovingBoxes

Simple horizontal slider which grows up the current box when it's in focus (image, title & text) and back down when it's not in focus.
http://css-tricks.github.io/MovingBoxes/
GNU Lesser General Public License v3.0
280 stars 147 forks source link

Align current panel to left.. #51

Closed madeByGoose closed 12 years ago

madeByGoose commented 12 years ago

Is there an easy way to make the current panel align to the left of the wrapper instead of centering it?

Mottie commented 12 years ago

You could just set the width option to 1. This hasn't been finalized yet, but in the next update I'm going to change the width option to be set as the panel width in pixels instead of a fractional percentage. Then you can set the panel width to match the overall width.

madeByGoose commented 12 years ago

I have the wrapper width to 900px with the panel width at 20%. This way 4 panels show up at a time. The only problem I was having is that when you are on the first panel, it centers so that there is a gap on the left. Instead I would like it to align left so that all the panels fill the screen. Maybe I'm getting in over my head?

Mottie commented 12 years ago

Hmm, are you changing the panel size at all? Like using the reducedSize option? If not, maybe consider using AnythingSlider... it was designed to work more along those lines. If you are, then I think there is a line in the script you could change to modify this behavior. I'll have to find it again.

madeByGoose commented 12 years ago

Wasn't using reducedSize... Anything slider looks like it will work perfect for what I am doing! Thanks for pointing me in the right direction..