1

Using SXA carousel with bootstrap template, but the image inside the slider does not contain the "img-responsive" tag, which is causing the issue with the image alignment, inside the parent div of the slider.

If I am adding the "img-responsive" tag manually, then the slide moment is breaking. Has any one faced the similar issue and got any solution? Or is there any other way to make the images in the slider responsive ?

  • What do you mean by "img-responsive" tag? – Dawid Rutkowski Jun 19 '18 at 7:12
  • I mean class, not tag. My bad. <img class="img-responsive" .. – user1621791 Jun 19 '18 at 7:22
  • It will depend upon the styling done on the component. You can apply your custom css on SXA components. – Amit Kumar Jun 19 '18 at 14:16
1

It's totally up to you what CSS class you will add to the Image rendering which is placed inside of the Carousel. The same with styling this class. If you apply custom (your own one) CSS class then it's your responsibility to style it correctly so that it won't break default SXA or your custom theme.

This is how you can add custom classes to the Image rendering:

enter image description here

And here is how you can manage the list of styles items:

enter image description here

  • Thanks a lot @Dawid Rutkowski For the response. I am able to add these styles (image default size, full width image ..) to the carousel. But I can not add these styles to a image particularly. Also My question was, is there any way we can make the image inside carousel responsive, as most images in responsive pages has "img-responsive" class, but having this class in carousel slide image, the slider breaks. Have you ever tried to make the carousel images responsive ? Any alternate way w/o adding the bootstrap class ? – user1621791 Jun 19 '18 at 12:32
  • Just drop an Image rendering into the Carousel slide and then you can add styles to an Image exactly the same as for the Carousel. – Dawid Rutkowski Jun 19 '18 at 12:47
  • I was not able to add the rendering, but I can add my custom styles to image using parent class, but in carousel, the image is not responsive. In change of screen size, the images are taking their original size. – user1621791 Jun 20 '18 at 7:44
  • I'm 100% it's just a styling issue. – Dawid Rutkowski Jun 20 '18 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.