Slider image alignment

Markus Bischof's Avatar

Markus Bischof

30 Mar, 2015 07:28 PM

Hi there,

by default the images inside a slider are centered (horizontal and vertical). Wouldn't it be cool to be able to set the alignment of each image individual via data attributes.

May the important part of an image is in the upper right corner of the image and on an other image the important part is down in the middle. So I thing always centering the image is not the ideal solution.

Maybe I missed something, but as far as see I can only tell RoyalSlider to center all the images or don't center all the images with imageAlignCenter.


  1. Support Staff 1 Posted by Dmitry Semenov on 31 Mar, 2015 01:01 PM

    Dmitry Semenov's Avatar
  2. 2 Posted by Markus Bischof on 31 Mar, 2015 01:24 PM

    Markus Bischof's Avatar


    I think that’s not what I’ve in mind. If I understand it correctly I could dynamically change the `imageAlignCenter` and the `imageScaleMode`.
    But what I want is a possibility to explicitly define if a image should be fixed `top`, `middle` or `bottom` for vertical alignment and `left`, `center`, `right` for horizontal alignment.

    I don’t know if it’s clear what I mean


  3. Support Staff 3 Posted by Dmitry Semenov on 31 Mar, 2015 01:33 PM

    Dmitry Semenov's Avatar

    There is no such option. You may disable imageScaleMode and imageAlignCenter and use CSS to style images, here is how to implement "fit" via CSS

  4. 4 Posted by Markus Bischof on 31 Mar, 2015 01:35 PM

    Markus Bischof's Avatar

    I already got it work with CSS. Just wanna know if you plan such a feature since it’s not too useless I think.

  5. Support Staff 5 Posted by Dmitry Semenov on 31 Mar, 2015 01:48 PM

    Dmitry Semenov's Avatar

    Oh, I missed that this was posted in "Suggestions". Thank you :)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac