treehouse : what would you like to learn today?
Web Design Web Development iOS Development

How can I make images full width in slider?

  • I was wondering how I can put any image width int he slider and it display the full width of the image.

    This is where I set the image width:

    Slider = new Class.create({
    "initialize": function (options) {
    this.options = {
    "slider" : "slider",
    "path" : "images/",
    "linkText" : "Explore",
    "itemWidth" : 320,
    "itemHeight" : 500,
    "items" : [],
    "animate" : true,
    "animationDelay": 5,
    "slideDelay" : 1,
    "slideLoop" : true,
    "onClick" : false
    };
    Object.extend(this.options, options || {});

    this.build();
    },


    is it possible to set some sort of width - 100% to it?

    You can view the site Here
  • The issue I see with stretching these images is that they will become blurry and distorted. I created a full screen gallery for a photographer site. You can see it at http://tatmanphotography.com/portfolio.php Maybe you can use this as a reference point.