Slider autosize border

mike.condron's Avatar


27 Sep, 2012 08:18 PM

Hi, I am new to CSS and JS, and have used Royal Slider in my site.

The autoScaleSlider works wonderfully when I change the size of the browser, but when I hit refresh, a border appears.

The site is here:

Do you know what I've done wrong?


  1. Support Staff 1 Posted by Dmitry Semenov on 28 Sep, 2012 06:26 AM

    Dmitry Semenov's Avatar


    Please describe what you mean by border and where it appears, as I don't see anything special... At least in Google Chrome.


  2. 2 Posted by mike.condron on 28 Sep, 2012 09:22 AM

    mike.condron's Avatar

    The slide on the right (slider2) has a white border to the images when page first loads, or you hit refresh. - see attached photo.

    If I drag the browser window to a different size, it corrects it.

    I want the the left slider (slider1, empty, just text) to be tight up against the right slider (slider2), no gap.

    I have tried it in Firefox, Chrome, Iexplore and on iPhone...same thing each time.

    I think the autoScaleSlider doesn't seem to happen unless I drag the browser window to a new size. is there a way to make it happen automatically on page load?

    Other than that, I'm delighted with it!

  3. Support Staff 3 Posted by Dmitry Semenov on 28 Sep, 2012 08:56 PM

    Dmitry Semenov's Avatar

    Oh, I see it sometimes now. This is caused by many deprecated tags in your markup, get rid of font tags and align attributes, as they might render skewed results. Also, percentage values like 85% will produce not rounded numbers which may cause this too.

    Also you may simply set imageScaleMode: 'fill', so it'll always fill all area of slider.


  4. 4 Posted by mike.condron on 28 Sep, 2012 11:49 PM

    mike.condron's Avatar

    Thank you! I had been trying to fix it by forcing an 'updateSliderSize', though without any success.

    I have now replaced the fusty "align" mark ups with "float" commands in the CSS, and it's working perfectly.

    Thanks again.

  5. mike.condron closed this discussion on 28 Sep, 2012 11:50 PM.

Comments are currently closed for this discussion. You can start a new one.

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