3

I have tried using lightGallery plugin for displaying a gallery, but when I click on an image it show them in half and on the side like this. All I want is to center the image. I have looked on the inspector and found some not friendly css markups and styles which I don't understand. Please help

enter image description here
My html markup is

<link rel="stylesheet" href="css/lightgallery.min.css">

    <div id="photos">
        <a href="img/r/one.png">
            <img src="holder.js/200x200?auto=yes&random=yes" alt="">
        </a>
        <a href="img/r/two.jpg">
            <img src="holder.js/200x200?auto=yes&random=yes" alt="">
        </a>
    </div>


and javascript is

<script src="js/vendor/lightgallery-all.min.js"></script>
    $(function () {
        $("#photos").lightGallery();
    })


I don't know what's wrong, I have searched the net and found nothing. Maybe because I don't know what to search for.

Lock Down
  • 65
  • 9

1 Answers1

4

I'm not sure you have solved this issue or not. I'm facing this issue few days, today I had figure out the problem, but I not sure your issue is it same as mine. How I fix this issue is my CSS body have "text-align:center", once I deleted the "text-align:center", issue fixed. I hope this can help you.

Sorry for my poor english.

Tommy Tom
  • 86
  • 2
  • 9