If you like Apple's Homepage you may enjoy the productslider as well - have a look at the iPod page.
Like the coverflow effect theses sliders are simple and intuitive way to navigate.
cSlider is my Prototype/script.aculo.us implementation of this koncept. (You can make wine our of apples: Cider. That's the c in cSlider)
Upload dir
src
, embed stylesheets and javascripte and add markup to your site.
In order to make adjustments as simple as possible, i splitted the styles into two different files:
c-slider-basics.css
contains all basic properties and you can customize cSlider editing
c-slider-customize.css
.
First of all you have to add:
As you can see in the basis example, the basic style determinetes a cSlider wich is 500 Pixel width and 140 Pixel heighz. Images in basic version are squared 70 Pixel.
If you need another dimensions and/or a different look, just embed in addition:
c-slider-customize.css
Of course you could edit the basic stylesheet, but i think it might be easier this way:
c-slider-customize.css
contains only properties which are relevant to change the dimensions or the look and this file is commented fairly detailed. The basic stylesheet itselfe is every thing else the self explaining while using css sprites and implizied width and height.
Last but not least you have to add the Javascripts; place them as close to
</body>
tag as possible:
As soon as the HTML is loaded for each element with
class='cSlider'
the script will called.
All background-images are added using css sprites; maybe the animation on the left can help to understand how the combinded background is constructed.
Within
./src/img/
you find the file
c-clider.psd
.
After opened it with Photoshop you migh find it a littel confusing. On the left site you find the combined background-image and on the other site there is a preview of how the cSlider box.
The confusing site is a little confusing while i tried to reduce the number of HTTP requests and use only a single background-image.
You will see that the psd has two groups with similar named layers. Play a little with layerstyles and colors of the upper group. Once you have a combination that meet the design of your page, just copy all your changes to the layers of the lower group.
Now crop canvas size to 65px width while keeping the upper left corner in place. After cropping you should see only the confusing parts. Save For Web as PNG 24 and done.
I'm looking forward to get your feedback! Please use the commentform at http://samisdat.org/cSlider.
cSlider is licenced under Creative Commons BY-SA Please have a look to the licence if you are not sure what is means.
Besides my script, stylesheets and images the .zip contains several more files: