2017-04-11 1 views
1

Ma galerie ressemble à ceci: https://drive.google.com/open?id=0BwBGhbPaJU_jdUl3cGdNQjVNVjgSupprimer l'espace blanc vertical entre les images de même largeur dans une galerie

Comme vous pouvez le voir c'est ma galerie, je voudrais les espaces ci-dessous et entre les images passées. (Indiqué par les flèches)

Voici mon code:

/*Gallery*/ 
 
#works-gallery{ 
 
\t margin:0px; 
 
\t position:relative; 
 
\t top:900px; 
 
\t width:1440; 
 
\t text-align:center; 
 
\t line-height: 0; 
 
\t column-count: auto; 
 
\t column-gap:0px; 
 
\t -webkit-column-count:auto; 
 
\t -webkit-column-gap:0px; 
 
\t -moz-column-count:auto; 
 
\t -moz-column-gap:0px; 
 
} 
 

 
#works-gallery img { 
 
\t postion:relative; 
 
\t display:inline-block; 
 
\t width:480px; 
 
\t height:auto; 
 
\t top:0px; 
 
\t vertical-align:top; 
 
\t padding:0px; 
 
\t border:0px; 
 
}
<div id="works-gallery"> 
 

 
    <img src="http://lorempixel.com/480/320/abstract" class="tile" /><img src="http://lorempixel.com/480/456/city" class="tile" /><img src="http://lorempixel.com/480/456/city" class="tile" /> 
 
    
 
    <td><img src="http://lorempixel.com/480/234/fashion" class="tile" /><img src="http://lorempixel.com/480/567/food" class="tile" /><img src="http://lorempixel.com/480/356/nature" class="tile" /> 
 
     
 
    <img src="http://lorempixel.com/480/678/nightlife" class="tile" /><img src="http://lorempixel.com/480/243/people" class="tile" /><img src="http://lorempixel.com/480/678/sports" class="tile" /> 
 
     
 
    <img src="http://lorempixel.com/480/256/technics" class="tile" /><img src="http://lorempixel.com/480/678/transport" class="tile" /><img src="http://lorempixel.com/480/235/abstract" class="tile" /> 
 
     
 
    <img src="http://lorempixel.com/480/678/animals" class="tile" /><img src="http://lorempixel.com/480/657/city" class="tile" /><img src="http://lorempixel.com/480/789/fashion" class="tile" /> 
 

 
</div>

Que dois-je changer s'il vous plaît?

+0

C'est parce que vos images ont des proportions différentes. Êtes-vous prêt à étirer ces photos de paysage pour s'adapter à vos photos de portrait? – JkAlombro

+0

Si vous voulez avoir des éléments de taille différente, vous devrez les déplacer manuellement avec la position. –

+0

@JkAlombro Non, je veux garder les proportions comme d'origine –

Répondre

0

Essayez de supprimer l'attribut d'alignement vertical

+0

Où dois-je le déplacer? –