Pourquoi tout n'est-il pas aligné? Aucun jaune ne devrait être visible et aucune orange ne devrait être visible sauf pour le côté droit et le coin inférieur gauche où il y a de l'espace pour une autre image.Pourquoi ces divs ne sont-ils pas alignés et espacés?
Fondamentalement, mes images sont assez alignées sur le centre (j'ai d'autres photos qui ne sont pas dans cet exemple, ce qui est plus facile à voir). Cependant dans ce cas quand j'ai l'image de la taille 150px la largeur 150 semble commencer plus bas. Aussi pourquoi y at-il des espaces entre
http://i42.tinypic.com/2jag1w7.jpg http://i42.tinypic.com/2jag1w7.jpg
alt text http://i41.tinypic.com/14jyv88.jpgalt text http://i40.tinypic.com/25506e1.jpg
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ldfk;sd</title>
<style type="text/css">
div.ImgGallery
{
max-width: 630px;
background: orange;
}
.ImgGallery div
{
display: inline;
}
/* http://www.brunildo.org/test/img_center.html */
.ImgGallery div div
{
display: table-cell;
text-align: center;
background: gray;
width: 150px;
height: 150px;
}
.ImgGallery div{
background: yellow;
vertical-align: middle;
}
//.ImgGallery div div :nth-child(2n+1) { background: red; }
.ImgGallery * {
vertical-align: middle;
}
.ImgGallery a
{
display: block;
}
.ImgGallery a *
{
border-style: none;
}
</style>
</head>
<div class="smallGallery">
<div class="ImgGallery">
<div><div><a href="http://google.com"><img src="a.jpg" alt="a.jpg"></a></div></div>
<div><div><a href="http://google.com"><img src="a.jpg" alt="a.jpg"></a></div></div>
<div><div><a href="http://google.com"><img src="a.jpg" alt="a.jpg"></a></div></div>
<div><div><a href="http://google.com"><img src="a.jpg" alt="a.jpg"></a></div></div>
<div><div><a href="http://google.com"><img src="a.jpg" alt="a.jpg"></a></div></div>
<div><div><a href="http://google.com"><img src="b.jpg" alt="a.jpg"></a></div></div>
<div><div><a href="http://google.com"><img src="a.jpg" alt="a.jpg"></a></div></div>
<div><div><a href="http://google.com"><img src="a.jpg" alt="a.jpg"></a></div></div>
<div><div><a href="http://google.com"><img src="b.jpg" alt="a.jpg"></a></div></div>
<div><div><a href="http://google.com"><img src="a.jpg" alt="a.jpg"></a></div></div>
<div><div><a href="http://google.com"><img src="a.jpg" alt="a.jpg"></a></div></div>
</div></div>
</body></html>
Je ne pouvais pas obtenir l'alignement vertical travaillant dans le li. Mais j'ai modifié le code et suis allé en arrière et l'ai aligné correctement. Actuellement theres pas li (il a gardé un contour noir et je ne pouvais pas l'enlever même après la frontière: aucun) et utiliser divs. Ça a l'air bien maintenant. Merci :) –
nevermind je vois la frontière css –