Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1265 connectés 

  FORUM HardWare.fr
  Programmation
  HTML/CSS

  Problème HTML

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Problème HTML

n°1864929
absot77
Posté le 23-03-2009 à 18:17:10  profilanswer
 

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/miniature/essai162.jpg
 
---------------------------------------------------------------------------------------
 
Et je mets également mon code:
 

Code :
  1. // Afficher du tableau
  2. echo "<table border='2' class='tableau'>";
  3. echo "<tr class='hauteur'>";
  4. echo "<th class='photo'>Photo du film</th>";
  5. echo "<th>Nom du film</th>";
  6. echo "<th class='description'>Description</th>";
  7. echo "<th>Genre</th>";
  8. echo "</tr>";
  9.          
  10. // tant qu'il y a des lignes de retournées on affiche les films
  11. while ($line = mysql_fetch_array($result)) {
  12. /* 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
  13. */
  14. echo "<tr class='hauteur'>";
  15. echo "<td class='centre'><img src=images/".$line[photo]." width=80px height=50px></td>";
  16. echo "<td>".$line[titre]."</td>";
  17. echo "<td>".$line[resume]."</td>";
  18.     echo "<td>".$titre[genre]."</td>";
  19. echo "</tr>";
  20.        }
  21. echo "</table>";


----------------------------------------------------------------------------------------
 
Ma page CSS:
 

Code :
  1. body{
  2. background-image:url("images/accueil.jpg" );
  3. background-repeat:repeat;
  4. }
  5. .tableau{
  6. height:100px;
  7. width:80%;
  8. margin-left:10%;
  9. border-style:solid;
  10. }
  11. .hautimage{
  12. height:100px;
  13. }
  14. .hauteur{
  15. background-color:white;
  16. height:50px;
  17. }
  18. .description{
  19. width:33%;
  20. background-color:white;
  21. }
  22. .photo{
  23. width:100px;
  24. height:100%;
  25. }
  26. .centre{
  27. margin-left:5%;
  28. }

mood
Publicité
Posté le 23-03-2009 à 18:17:10  profilanswer
 

n°1865080
blackhawke​r
IWH and almost anywhere
Posté le 24-03-2009 à 08:16:42  profilanswer
 

text-align: center pour .centre en définissant une largeur à ta cellule?


Message édité par blackhawker le 24-03-2009 à 08:19:03

---------------
création de site - photo

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  HTML/CSS

  Problème HTML

 

Sujets relatifs
probleme liste deroulante Php / HTMLPetit problème d'affichage HTML
Probleme avec pages html et lien sous IE 7[HTML/CSS] problème d'organisation - Résolu.
Problème tableau htmlproblème avec un modulo et un tableau html
Problème bête, feuille de style htmlProblème De HTML et CSS
problème avec XSL pour générer HTML à partir de XMLproblème d'affichage RSS 2.0 depuis source html
Plus de sujets relatifs à : Problème HTML


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR