In the above code, the outer div has a width property 100%, it will have the same width as your webpage.

The inner div should have the same width as your slider. The width value can be pixels, for example "400px", or in percent, for example "80%". Its margin property "0 auto" will place the inner div to the center of the outer div.