Gallerie photo
aneantisseur
Messages postés
411
Statut
Membre
-
aneantisseur Messages postés 411 Statut Membre -
aneantisseur Messages postés 411 Statut Membre -
Bonjour, j'ai un petit problème pour ma galerie photo.
Je voudrais qu'il y ait 3 photos sur la même ligne de mon tableau, puis, quand il y en a 3, faire une seconde ligne.
Le problème c'est que il n'y a qu'une photo par ligne, or j'en veux 3.
Voici mon tableau
$numero = 1;
$image = 0;
$retour_photos = mysql_query('SELECT * FROM gallerie ORDER BY id ASC ');
echo '<table>
';
while ($donnees = mysql_fetch_array($retour_photos))
{
$image++;
echo '
<tr><td>Image n°'.$numero++.' : '.$donnees['titre'].'
<div class=photos_gallerie><img src="'.$donnees['chemin'].'" /></div></td>
';
if ($image == 3)
{
$image = 0;
echo'</tr>
';
}
}
echo ' </table>
';
Et voici le css qui va avec :
.photos_gallerie
{
text-align: center;
}
td
{
width: 250px;
height: 250px;
border-style : outset;
border-width : 5px;
}
Voila. En espérant que vous pouvez m'aider.
Je voudrais qu'il y ait 3 photos sur la même ligne de mon tableau, puis, quand il y en a 3, faire une seconde ligne.
Le problème c'est que il n'y a qu'une photo par ligne, or j'en veux 3.
Voici mon tableau
$numero = 1;
$image = 0;
$retour_photos = mysql_query('SELECT * FROM gallerie ORDER BY id ASC ');
echo '<table>
';
while ($donnees = mysql_fetch_array($retour_photos))
{
$image++;
echo '
<tr><td>Image n°'.$numero++.' : '.$donnees['titre'].'
<div class=photos_gallerie><img src="'.$donnees['chemin'].'" /></div></td>
';
if ($image == 3)
{
$image = 0;
echo'</tr>
';
}
}
echo ' </table>
';
Et voici le css qui va avec :
.photos_gallerie
{
text-align: center;
}
td
{
width: 250px;
height: 250px;
border-style : outset;
border-width : 5px;
}
Voila. En espérant que vous pouvez m'aider.
A voir également:
- Gallerie photo
- Google photo - Télécharger - Albums photo
- Photo filtre 7 gratuit - Télécharger - Retouche d'image
- Google maps photo maison - Guide
- Partage photo - Guide
- Google traduction photo - Guide