2

I have a problem, I don't understand why I can't get thumbnails center vertically on the list?

I tried:

.my-gallery figure {
    display: block;
    float: left;
    margin: 0 5px 20px;
    vertical-align: middle;
    width: 140px;}

and:

.my-gallery img {
    height: auto;
    vertical-align: middle;
    width: 100%;}

...but the thumbnails are always aligned to top. My thumbnails do not have the same size and it is not very pretty.

GrizzlyManBear
  • 647
  • 8
  • 16

1 Answers1

2

This actually helped me: Centering a div block without the width .

Basically, create another div around the div that contains the gallery photos:

<div id="container"> <div id="gallery"> <img></img> </div> </div>

Configure CSS:

#gallery { display:inline-block; }

#container { text-align: center; }

Sandy D.
  • 3,166
  • 1
  • 20
  • 31