Not centered images

raphael.bastide's Avatar

raphael.bastide

12 Oct, 2012 12:11 AM

Hello,
I can't manage to center te miage in their parent's div. They have a margin left I can't get rid of.

Here is a debug screenshot

JS

jQuery(document).ready(function($) {
var si = $('.gal').each(function(){
  $(this).royalSlider({
  addActiveClass: true,
  arrowsNav: false,
  controlNavigation: 'none',
  autoScaleSlider: true, 
  autoScaleSliderWidth: 960,     
  autoScaleSliderHeight: 650,
  imageAlignCenter: true,
  loop: true,
  fadeinLoadedSlide: false,
  globalCaption: true,
  keyboardNavEnabled: true
  });
});
});

HTML

<div class="sliderContainer visibleNearby fullWidth clearfix">
        <div class="gal royalSlider rsDefault">              
              <a class="rsImg" href="@url" data-rsBigImg="@url"></a>
              <a class="rsImg" href="@url" data-rsBigImg="@url"></a>
              <a class="rsImg" href="@url" data-rsBigImg="@url"></a>
          endforeach
</div>

CSS

The same than visible-nearby template.

  1. Support Staff 1 Posted by Dmitry Semenov on 12 Oct, 2012 06:34 AM

    Dmitry Semenov's Avatar

    Hello,

    Please send me a link, or attach project files to message.

    Dmitry

  2. 2 Posted by raphael.bastide on 12 Oct, 2012 10:13 AM

    raphael.bastide's Avatar

    Hello again.
    Here is the folder.

    Instructions

    1. Run apache, open index.php
    2. Image loop is in /templates/partials/navigation/projects-list.html
    3. CSS and JS are in /public/docs/
    4. Projects images are stored in /content/4.projects/31.divers (just un case)

    Thank you for your help Dmitry.

  3. Support Staff 3 Posted by Dmitry Semenov on 12 Oct, 2012 02:13 PM

    Dmitry Semenov's Avatar

    Add

    .royalSlider {
        text-align: left;
    }
    

    Slider is ineriting text-align:center from your body style which causes "double" centering.

    Dmitry

  4. 4 Posted by raphael.bastide on 12 Oct, 2012 04:42 PM

    raphael.bastide's Avatar

    Oh I see, thanks a lot for that!

  5. raphael.bastide closed this discussion on 12 Oct, 2012 04:42 PM.

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