Problème css
Absot
Messages postés
777
Date d'inscription
Statut
Membre
Dernière intervention
-
Absot Messages postés 777 Date d'inscription Statut Membre Dernière intervention -
Absot Messages postés 777 Date d'inscription Statut Membre Dernière intervention -
Bonjour, je fais un TP et je voudrais centrer l'image de l'affiche du film, j'ai utiliser un "margin:auto" mais ça ne fonctionne pas, j'ai essayer avec "margin-left:..%" mais l'image ne bouge toujours pas..
Je vous montre un screen pour que vous compreniez mieux:
http://www.zimagez.com/zimage/essai162.php][img]http://www.zimagez.com/miniature/essai162.jpg
---------------------------------------------------------------------------------------
Et je mets également mon code:
// Afficher du tableau
echo "<table border='2' class='tableau'>";
echo "<tr class='hauteur'>";
echo "<th class='photo'>Photo du film</th>";
echo "<th>Nom du film</th>";
echo "<th class='description'>Description</th>";
echo "<th>Genre</th>";
echo "</tr>";
// tant qu'il y a des lignes de retournées on affiche les films
while ($line = mysql_fetch_array($result)) {
/* la fonction mysql_fetch_array retourne les résultats sous la forme d'un tableau associatif dans lequel on accède aux différents éléments de la manière suivante
*/
echo "<tr class='hauteur'>";
echo "<td class='centre'><img src=images/".$line[photo]." width=80px height=50px></td>";
echo "<td>".$line[titre]."</td>";
echo "<td>".$line[resume]."</td>";
echo "<td>".$titre[genre]."</td>";
echo "</tr>";
}
echo "</table>";
----------------------------------------------------------------------------------------
Ma page CSS:
body{
background-image:url("images/accueil.jpg");
background-repeat:repeat;
}
.tableau{
height:100px;
width:80%;
margin-left:10%;
border-style:solid;
}
.hautimage{
height:100px;
}
.hauteur{
background-color:white;
height:50px;
}
.description{
width:33%;
background-color:white;
}
.photo{
width:100px;
height:100%;
}
.centre{
margin-left:5%;
}
Je vous montre un screen pour que vous compreniez mieux:
http://www.zimagez.com/zimage/essai162.php][img]http://www.zimagez.com/miniature/essai162.jpg
---------------------------------------------------------------------------------------
Et je mets également mon code:
// Afficher du tableau
echo "<table border='2' class='tableau'>";
echo "<tr class='hauteur'>";
echo "<th class='photo'>Photo du film</th>";
echo "<th>Nom du film</th>";
echo "<th class='description'>Description</th>";
echo "<th>Genre</th>";
echo "</tr>";
// tant qu'il y a des lignes de retournées on affiche les films
while ($line = mysql_fetch_array($result)) {
/* la fonction mysql_fetch_array retourne les résultats sous la forme d'un tableau associatif dans lequel on accède aux différents éléments de la manière suivante
*/
echo "<tr class='hauteur'>";
echo "<td class='centre'><img src=images/".$line[photo]." width=80px height=50px></td>";
echo "<td>".$line[titre]."</td>";
echo "<td>".$line[resume]."</td>";
echo "<td>".$titre[genre]."</td>";
echo "</tr>";
}
echo "</table>";
----------------------------------------------------------------------------------------
Ma page CSS:
body{
background-image:url("images/accueil.jpg");
background-repeat:repeat;
}
.tableau{
height:100px;
width:80%;
margin-left:10%;
border-style:solid;
}
.hautimage{
height:100px;
}
.hauteur{
background-color:white;
height:50px;
}
.description{
width:33%;
background-color:white;
}
.photo{
width:100px;
height:100%;
}
.centre{
margin-left:5%;
}
A voir également:
- Problème css
- Css download - Télécharger - HTML
- Enlever le soulignement d'un lien css ✓ - Forum Réseaux sociaux
- Css ligne horizontale ✓ - Forum CSS
- Enlever le soulignage des lien. - Forum CSS
- Enlever soulignement lien css ✓ - Forum CSS