Centring slides horizontally but not vertically
Hi Dmitry,
Is it possible to centre slides horizontally but not vertically?
I've tried setting imageAlignCenter
to false and
centring with CSS but that didn't work.
Looks like it's being set here:
if (imgAlignCenter) {
cssObj.marginLeft = Math.floor((containerWidth - nWidth) / 2) + bMargin;
cssObj.marginTop = Math.floor((containerHeight - nHeight) / 2) + bMargin;
}
Any suggestions on how to change that externally? (I'd prefer to avoid modifying the library directly if possible).
-- Zubin
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Dmytro Semenov on 14 Sep, 2012 05:12 AM
Hi,
You can set
imageAlignCenter
to true and applymargin-top: 0 !important;
to images.If you want to override slider functions, this artcile will help - http://help.dimsemenov.com/kb/royalslider-javascript-api/extending-...
Dmitry
2 Posted by zubin.henner on 17 Sep, 2012 01:11 AM
Thanks, that worked perfectly.
zubin.henner closed this discussion on 17 Sep, 2012 01:11 AM.