Jump to content

First slider image not full width


Recommended Posts

Not sure when it happened as it was ok before but my standard slider has a problem. I'm running PS 1.7.8 and php 7.4

The first slider image does not fill the width of the screen, however the other two images in the slider are fine.

I dont know where to change this, I've seen it mentioned that there could be an option in Module manager but I cannot find anthing regarding width or margins for slider images.

Hope someone can help with a simple fix.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

the margins for the slider can be set using CSS files.

For instance in /themes/yourtheme/assets/css/custom.css

@media (max-width:1200px){ #index .carousel .carousel-item img {width:125%;} #index #carousel h2{margin-left:-200px} }

However the best thing to do, IMHO, seems to edit the first slider image: crop it or add the exact margins you want, in order to obtain the same size as the other pictures.

(There are free and efficient tools that can do that, such as https://www.gimp.org/ )

Edited by Marz12 (see edit history)
Link to comment
Share on other sites

Thanks for a response.

I thought the whole point with PS was ease of use limited coding??

I also thought PS was meant to auto size the images, it may be that an update of PS & or PHP caused this issue. I'm a novice and if every time an update is done it breaks the site I guess PS is not a good choice.

As I said all three images were ok before ,full width in the standard slider. I have selected one of the other images for the first and same problem so its not the image, it looks like the slider has been broken by an update of PS as I rolled back PHP.

Link to comment
Share on other sites

Hello,

Yes, the point with PS is ease of use + limited coding, if not no coding at all. But giving a good shape to your pictures is not about coding, you will have to do that on most of websites. (Even a good professional Facebook page needs well shaped pictures as indicated in FB).

I'm sorry if something went wrong when you updated your PS. I also use PS's slider, my updates of PS + PHP never change the settings of the slider. That's because I've put it on a "child theme" https://devdocs.prestashop.com/1.7/themes/reference/template-inheritance/parent-child-feature/

Anyway, if I were you, I would start with

  1. shape your pictures as to have the same dimensions for everyone. Even better, give them the same dimensions as in PS's default slider.
  2. reset the slider's settings
  3. import your pictures
  4. check if everything is okay and finish the settings.

You also can tell us what kind of errors or problems you get with the slider.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...