title: Center thumbnails in LightGallery
body: <p>I'm using LightGallery to make an image gallery and everything's working fine so far but I want to align the entire grid of thumbnails to the center of the page.
  Right now is just stuck to the left side.Here's the code I used:</p>
  
  <pre><code>&lt;div class="demo-gallery"&gt;
  &lt;ul id="lightgallery" class="list-unstyled row"&gt;
  &lt;li class="col-xs-6 col-sm-4 col-md-3" data-responsive="img/alba-iulia.jpg 480, img/1.jpg 480, img/3.jpg 800" data-src="img/alba-iulia.jpg" data-sub-html=""&gt;
      &lt;a href=""&gt;
          &lt;img class="img-responsive" src="img/alba-iulia.jpg"&gt;
      &lt;/a&gt;
  &lt;/li&gt;
  &lt;li class="col-xs-6 col-sm-4 col-md-3" data-responsive="img/alba-iulia.jpg 480, img/1.jpg 480, img/3.jpg 800" data-src="img/3.jpg" data-sub-html=""&gt;
      &lt;a href=""&gt;
          &lt;img class="img-responsive" src="img/3.jpg"&gt;
      &lt;/a&gt;
  &lt;/li&gt;
  &lt;li class="col-xs-6 col-sm-4 col-md-3" data-responsive="img/alba-iulia.jpg 480, img/1.jpg 480, img/3.jpg 800" data-src="img/1.jpg" data-sub-html=""&gt;
      &lt;a href=""&gt;
          &lt;img class="img-responsive" src="img/1.jpg"&gt;
      &lt;/a&gt;
  &lt;/li&gt;
  &lt;li class="col-xs-6 col-sm-4 col-md-3" data-responsive="img/alba-iulia.jpg 375, img/1.jpg 480, img/3.jpg 800"  data-src="img/alba.jpg" data-sub-html=""&gt;
      &lt;a href=""&gt;
          &lt;img class="img-responsive" src="img/alba.jpg"&gt;
      &lt;/a&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>EDIT: Here's the CSS: </p>
  
  <pre><code>.demo-gallery{
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    width: 1120px;
    margin-top: 50px;
  }
  
  .demo-gallery &gt; ul {
    margin-bottom: 0;
  }
  .demo-gallery &gt; ul &gt; li {
      float: left;
      margin-bottom: 15px;
      margin-right: 0px;
      width: 280px;
  }
  .demo-gallery &gt; ul &gt; li a {
    border: 3px solid #FFF;
    border-radius: 3px;
    display: block;
    overflow: hidden;
    position: relative;
    float: left;
    text-align: center;
  }
  .demo-gallery &gt; ul &gt; li a &gt; img {
    -webkit-transition: -webkit-transform 0.15s ease 0s;
    -moz-transition: -moz-transform 0.15s ease 0s;
    -o-transition: -o-transform 0.15s ease 0s;
    transition: transform 0.15s ease 0s;
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
    height: 100%;
    width: 100%;
  }
  .demo-gallery &gt; ul &gt; li a:hover &gt; img {
    -webkit-transform: scale3d(1.1, 1.1, 1.1);
    transform: scale3d(1.1, 1.1, 1.1);
  }
  .demo-gallery &gt; ul &gt; li a:hover .demo-gallery-poster &gt; img {
    opacity: 1;
  }
  .demo-gallery &gt; ul &gt; li a .demo-gallery-poster {
    background-color: rgba(0, 0, 0, 0.1);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    -webkit-transition: background-color 0.15s ease 0s;
    -o-transition: background-color 0.15s ease 0s;
    transition: background-color 0.15s ease 0s;
  }
  .demo-gallery &gt; ul &gt; li a .demo-gallery-poster &gt; img {
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    opacity: 0;
    position: absolute;
    top: 50%;
    -webkit-transition: opacity 0.3s ease 0s;
    -o-transition: opacity 0.3s ease 0s;
    transition: opacity 0.3s ease 0s;
  }
  .demo-gallery &gt; ul &gt; li a:hover .demo-gallery-poster {
    background-color: rgba(0, 0, 0, 0.5);
  }
  .demo-gallery .justified-gallery &gt; a &gt; img {
    -webkit-transition: -webkit-transform 0.15s ease 0s;
    -moz-transition: -moz-transform 0.15s ease 0s;
    -o-transition: -o-transform 0.15s ease 0s;
    transition: transform 0.15s ease 0s;
    -webkit-transform: scale3d(1, 1, 1);
    transform: scale3d(1, 1, 1);
    height: 100%;
    width: 100%;
  }
  .demo-gallery .justified-gallery &gt; a:hover &gt; img {
    -webkit-transform: scale3d(1.1, 1.1, 1.1);
    transform: scale3d(1.1, 1.1, 1.1);
  }
  .demo-gallery .justified-gallery &gt; a:hover .demo-gallery-poster &gt; img {
    opacity: 1;
  }
  .demo-gallery .justified-gallery &gt; a .demo-gallery-poster {
    background-color: rgba(0, 0, 0, 0.1);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    -webkit-transition: background-color 0.15s ease 0s;
    -o-transition: background-color 0.15s ease 0s;
    transition: background-color 0.15s ease 0s;
  }
  .demo-gallery .justified-gallery &gt; a .demo-gallery-poster &gt; img {
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    opacity: 0;
    position: absolute;
    top: 50%;
    -webkit-transition: opacity 0.3s ease 0s;
    -o-transition: opacity 0.3s ease 0s;
    transition: opacity 0.3s ease 0s;
  }
  .demo-gallery .justified-gallery &gt; a:hover .demo-gallery-poster {
    background-color: rgba(0, 0, 0, 0.5);
  }
  .demo-gallery .video .demo-gallery-poster img {
    height: 48px;
    margin-left: -24px;
    margin-top: -24px;
    opacity: 0.8;
    width: 48px;
  }
  .demo-gallery.dark &gt; ul &gt; li a {
    border: 3px solid #04070a;
  }
  .home .demo-gallery {
    padding-bottom: 80px;
  }
  </code></pre>
  
  <p>I read on a post from that I should use margin-left: auto and margin-right: auto ( I used it on the ul but doesn't seem to work.) Thanks for your help!</p>