Question

I was referring to many questions on stack overflow to show image on centre.but I'm unable to do that.

My html:

<section class="graphics_container slides_container" style="position: relative;margin: 0 auto;">
<img id="128" src="https://fadsf.s3.amazonaws.com/md128.jpg" alt="sfdws" style="position: absolute; top: 0px; left: 0px; display: none; z-index: 4; opacity: 0; margin-left: 0px; margin:0 auto;   ">                                                               <img id="127" src="https://testingsdfafandroidtj.s3.amazonaws.com/md127.jpg" alt="sdfsf" style="position: absolute; top: 0px; left: 0px; display: none; z-index: 4; margin-left: 0px; opacity: 0;">
</section>

My Js:

 $('.slides_container').cycle({ 
    fx:     'fade', 
    speed:  'slow', 
    timeout: 0, 
     slideResize: 0 ,
     containerResize: 0,
    after: function(curr, next, opts) {          
    callGalleryDetails($(next).attr('id'));
    $('.number').html(opts.currSlide + 1  +"/"+opts.slideCount) ;
         },
    next:   '.slides-right', 
    prev:   '.slides-left' ,
    center : 1,
    fit: 0,
    startingSlide: $('#starting_index').val(),
    slideExpr: 'img'
});

But still image gets displayed in left corner. Cycle plugin apply margin-left: 0px; to all images.Can anyone suggest how to fix this?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top