Page 1 sur 2
bête probleme de mise en page
Posté : 27 juil. 2005, 07:43
par Manio 54
Bonjour
Après avoir fait une requete d'affichage de ma BDD les resultats s'affiche un peu n'importe comment (sauf le premier) sachant que j'ai creé un tableau je pense qu'il n'y a que le premier qui s'affiche dans le tableau.
Comment faire ?
Merci
Re: bête probleme de mise en page
Posté : 27 juil. 2005, 08:20
par pjl
Comment faire ?
Montrer ton code actuel.
Posté : 27 juil. 2005, 09:50
par mere-teresa
Modération : si c'est de la mise en page pure, direction "HTML et CSS", mais si c'est ton PHP qui mer... on reste ici. J'attends de voir le code pour décider 
Posté : 28 juil. 2005, 10:32
par Manio 54
desolé pour le retard
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Site des Miss / Mister</title>
</head>
<body style="background-image: url('../../Fond/Miss2.png')">
<table border="0" cellpadding="0" cellspacing="0" width="1024" height="660" id="table1">
<!-- MSTableType="layout" -->
<tr>
<td valign="top" colspan="2">
<!-- MSCellType="DecArea" -->
</td>
<td valign="top" height="83" colspan="2">
<!-- MSCellType="ContentHead" -->
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td valign="top" height="125" colspan="2">
<p align="center"> </p>
<p align="center"><b><i>
<font face="Comic Sans MS" size="6" color="#FF0000">Master of MISS
MISTER</font></i></b></td>
</tr>
<tr>
<td valign="top" rowspan="2">
<!-- MSCellType="ContentBody" -->
<table cellpadding="0" cellspacing="0" width="193" height="75" id="table2">
<!-- MSCellFormattingTableID="1" -->
<tr>
<td height="75" width="193">
<!-- MSCellFormattingType="content" -->
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="193" height="75" id="table3">
<!-- MSCellFormattingTableID="2" -->
<tr>
<td height="75" width="193">
<!-- MSCellFormattingType="content" -->
<p align="center"><font face="Comic Sans MS" size="4">
<a href="../inscription.htm">Inscris
toi !</a></font></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="193" height="75" id="table4">
<!-- MSCellFormattingTableID="3" -->
<tr>
<td height="75" width="193">
<!-- MSCellFormattingType="content" -->
<p align="center"><font face="Comic Sans MS">Partie Miss</font></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="193" height="75" id="table5">
<!-- MSCellFormattingTableID="4" -->
<tr>
<td height="75" width="193">
<!-- MSCellFormattingType="content" -->
<p align="center"><font face="Comic Sans MS">Partie Mister</font></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="193" height="75" id="table6">
<!-- MSCellFormattingTableID="5" -->
<tr>
<td height="75" width="193">
<!-- MSCellFormattingType="content" -->
</td>
</tr>
</table>
<p> </p>
<p align="center"> </td>
<td> </td>
<td valign="top">
<!-- MSCellType="NavBody" -->
<table cellpadding="0" cellspacing="0" width="296" height="337">
<!-- MSCellFormattingTableID="7" -->
<tr>
<td height="337" width="296">
<!-- MSCellFormattingType="content" -->
<? include("../config.inc.php");
$reponse = mysql_query("SELECT * FROM miss");
while ($donnees = mysql_fetch_array($reponse) )
{
?>
<p align="left"><font color="#3333CC" face="Comic Sans MS">
Nom : <? echo $donnees["prenom"]; ?> </font><font face="Comic Sans MS"><font color="#3333CC"><p align="left"> Age : <? echo $donnees["age"]; ?> <br /><br />
Ville : <? echo $donnees["ville"]; ?> <br /><br />
Célib : <? echo $donnees["celib"]; ?> <br /><br />
MSN : <? echo $donnees["msn"]; ?> </font></td>
</tr>
</table>
</p>
<? echo '<a href="http://manio54.free.fr/miss/vote.php?id='.$donnees["id"].'">Vote !!!</a>';?><p align="center"> </p>
</font></td>
<td height="390" valign="top"> <? echo '<img src="./photo/'.$donnees['photo'].'" />'; ?></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td height="61"> </td>
</tr>
<tr>
<td width="193"></td>
<td width="142"></td>
<td width="296"></td>
<td height="1" width="393"></td>
<?
}
mysql_close();
?>
</tr>
</table>
</body>
</html>
Desolé pour la presentation du code c'est pas très simple a lire faudra que je simplifie !!! donc mon problème c'est que les premières infos s'affiche correctement dans le tableau mais la deuxième se met au dessus !!!
Posté : 28 juil. 2005, 10:39
par charabia
ta boucle est trop bizarre...tu as un <TD> hors boucle et tout le reste du code se trouve dans la boucle...je crois qu'il y a comme quelque chose qui cloche...

Posté : 28 juil. 2005, 10:40
par mere-teresa
Et quel est le code HTML de ta page au final ?
Posté : 28 juil. 2005, 10:42
par pjl
Tu fermes un tableau dans ta boucle alors que tu n'en ouvres pas dedans.
A ta place, je regarderais le code source généré.
Y'a pas mal de truc un peu bizare au niveau du HTML.
Posté : 28 juil. 2005, 10:45
par Manio 54
enfait pour mon code html je m'embete pas trop j'ai pris frontpage donc voila c'est lui qui a edité moi j'ai juste rajouté le php !!!
Posté : 28 juil. 2005, 10:47
par charabia
Bé je crois bien qu'il faut que tu y mettes quand même un peu les mains pour arranger tout ça, ne pas se fier à frontpage, dreamweaver ou autre...juste à ses tites mains

Posté : 28 juil. 2005, 10:52
par Manio 54
^^ oui je pense qu'il faut que je m'y mette ! Vous pensez que cela résoudra mon problème d'affichage dans le tableau ?
Posté : 28 juil. 2005, 10:52
par pjl
Ben, oui.
Posté : 28 juil. 2005, 10:54
par charabia
Tu m'a ôté le mot de la bouche pjl
Regardes bien ton tableau dans la boucle Manio, c'est ça qui bug.
Posté : 28 juil. 2005, 10:59
par Manio 54
d'accord donc j'essaie sa !! Vu que vous me dites que cela marchera je mets le resolu !!
Allez merci
Posté : 28 juil. 2005, 11:04
par Manio 54
un bon site pour apprendre le html vous me conseillez quoi ? le site du zero ??
Posté : 28 juil. 2005, 11:14
par mere-teresa
Hum.
Je conseillerai l'AltruisteL et puis de lire ce sujet sur le forum http://www.phpfrance.com/forums/voir_sujet-2909.php