Close

Slider fixed size

linkxperts
9 years ago
#7998 Quote
Avatar
  • 8
The slider in the Allure theme is sizing along with the page width.
Can I disable that?

I want to keep the images in the slide the same height at all times.

Thanks,
Marcel
Deni
9 years ago
#7999 Quote
Avatar
  • Moderator
  • 389
linkxperts wrote:
The slider in the Allure theme is sizing along with the page width.
Can I disable that?

I want to keep the images in the slide the same height at all times.

Thanks,
Marcel


Hello,

Keep in mind that this feature is made on purpose, because when you look the site on a mobile device the viewport of the device can be for example 400x500px. Then the slider will take the whole screen and will be really annoying for the user to see it.

Anyway, you can achieve the fixed height by finding this rule:

.nivoSlider img {
  position: absolute;
  top: 0px;
  left: 0px;
  max-width: none;
}


Inside this file:

\Plugins\SevenSpikes.Nop.Plugins.AnywhereSliders\Styles\nivo\themes\nivo-slider.css

Now just edit the rule to look like this (you may edit the height by your taste):

.nivoSlider img {
  position: absolute;
  top: 0px;
  left: 0px;
  max-width: none;
  width: auto !important;
  height: 450px !important;
/* edit the height */
}


I should say it once again: we do not recommend this, because it will ruin the mobile users experience.
Best Regards,
Mladen Staykov
Nop-Templates.com
linkxperts
9 years ago
#8000 Quote
Avatar
  • 8
Thanks, that works.
We have disabled the slider for lower resolutions.