automatically generate height?

jason's Avatar

jason

30 Nov, 2012 02:02 PM

Hi,

I have my images with 100% width and an 'auto' height. What I want is for the slider to use the dimensions of the first image to generate how big the slider should be.

Example. If my first image is 1000x500 and the screen width is 1000px then the slider should be 1000x500. If the screen width is 500. The slider would be 500x250.

Can this be achieved with some css rules or do I need to write some JavaScript. Can anyone recommend how I should go about doing this? Would I need to use Events in the API? Any advice is much appreciated.

  1. Support Staff 1 Posted by Dmytro Semenov on 30 Nov, 2012 03:26 PM

    Dmytro Semenov's Avatar

    Hi,

    If you need just to change height - enable autoHeight option http://dimsemenov.com/plugins/royal-slider/documentation/#options

    If you want to change both width and height, you'll need to add som JS code.

    Dmitry

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

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