Close

Avoid homepageslider to expand beyond actual picture size

rogerhaugland99
9 years ago
#9361 Quote
Avatar
  • 3
Hi, 

Is it possible to restrict the homepageslider size to the actual picture size?

If I use an image in size 1600x610 it expands to 1903 x 726px when on a 1920x1200 screen resolution. This reduces the quality of the image. Also for some product i only have 950px wide image for the slider and it looks very weird when these expand to 1920px wide.

Roger
Peter.Zhekov
9 years ago
#9362 Quote
Avatar
  • Moderator
  • 104
Hi there,

If your images for the slider are smaller you can set style property for max-with (look the example below) and this way to limit the stretching of the slider just as much as you want.

.slider-wrapper {
    margin: 0 auto;
    max-width: 1600px;
    position: relative;
    z-index: 1;
}

The bold styles are the one you must change. For 'max-widht' use whatever value you want, and 'margin: 0 auto;' will hold your slider in the center of the screen. Where you must place this styles? In the file '~Plugins/SevenSpikes.Nop.Plugins.AnywhereSliders/Themes/your theme name here/Content/nivo/nivo.css'. Just look for this selector - '.slider-wrapper'-  and add the styles and values you want.
Regards,
Peter Zhekov
Nop-Templates.com