Alignements et tableaux

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : Alignements et tableaux

par Filament » 03 juin 2005, 18:41

J'ai pas du tout comprendre car je n'utilise pas de DIV, juste des <table>
Donc la solution c'est de faire autrement (sachant que je sais déjà que 90% des visiteurs seront sous IE) ?

par collaud » 03 juin 2005, 10:22

je l'attendais....... 8)

dis y a un jeune programmeur en herbe qui a de la peine dans le forum javascript...il faudrait l'aider je pense...il s'appelle collaud !

par Cyrano » 03 juin 2005, 10:16

ouais je connais ce site, ils nous l'avaient montrés aux cours dreamweaver y a 2 ans...il a pas pris une ride !
lol, ben pour faire un site comme ça avec DreamWeaver, bonne chance :langue:

par collaud » 03 juin 2005, 10:15

ouais je connais ce site, ils nous l'avaient montrés aux cours dreamweaver y a 2 ans...il a pas pris une ride !

par Cyrano » 03 juin 2005, 09:50

...les balises <DIV> sous IE, c'est trop mal geré...
Non, la difficulté c'est de créer une feuille de style qui offre le même résultat avec IE et les autres navigateurs. J'en veux pour preuve un site spectaculaire sans tableaux, donc géré avec des <div> qui a un affichage similaire sous tous les navigateurs : csszengarden : regadez et modifiez le style en choisissant dans le menu une autre feuille de style : le contenu restera strictement le même, rien n'est modifié dans le code html, en revanche, la feuille de style est différente.

par collaud » 03 juin 2005, 09:49

tout à fait d'accord, d'autant plus que :

- la proportion s'équilibre (très gentilment) au niveau des % d'utilisateur des autres navig' que IE...
- les div sont assez lourdes à gérer
- FF est de plus en plus utilisé par les amateur/pros...et c'est eux qu'il faut impressionner...

par zeus » 03 juin 2005, 09:47

C'est le soucis majeur des développeurs Web : est-ce que je fait un truc super joli, super fun mais qui ne marche que sous un explorateur ou est-ce que je fait quelquechose de moins joli mais qui fonctionne de partout ?

Sans hésiter, je choisi la seconde !!! Il faut penser que tout le monde n'utilise pas FF, il y a IE, Netscape, Opera, Safari, ...

Si tu commence à dire, je garde les div parce que ça marche chez moi, tu rique de te priver des internautes n'utilisant pas le même browser que toi, sachant que le but d'un site web, c'est d'attirer le plus de visiteurs possible ...

par collaud » 03 juin 2005, 09:39

On m'a toujours conseillé de ne pas utiliser les div !!

ça joue peut-être sous un navigateur, mais jamais sur tous les autres....

par zeus » 03 juin 2005, 09:33

Au hasard, je dirais ... les <div> !!!!!

Je suis en train de me prendre la tête avec les balises <DIV> sous IE, c'est trop mal geré...

Alignements et tableaux

par Filament » 02 juin 2005, 19:23

Bonjour

Alors le code qui va suivre possède des aprties dynamiques mais ce ne sont pas celles ci qui me posent problème, donc je poste plutot ici.

Regardez la bête, c'est le code de ma page:
<?php require_once('Connections/DisneyHebdo.php'); ?>
<?php require_once('Connections/DisneyHebdo.php'); ?>
<?php
mysql_select_db($database_DisneyHebdo, $DisneyHebdo);
$query_edito = "SELECT edito FROM edito WHERE `date` = '1'";
$edito = mysql_query($query_edito, $DisneyHebdo) or die(mysql_error());
$row_edito = mysql_fetch_assoc($edito);
$totalRows_edito = mysql_num_rows($edito);

mysql_select_db($database_DisneyHebdo, $DisneyHebdo);
$query_titre = "SELECT titre FROM auteur WHERE code = '1'";
$titre = mysql_query($query_titre, $DisneyHebdo) or die(mysql_error());
$row_titre = mysql_fetch_assoc($titre);
$totalRows_titre = mysql_num_rows($titre);

mysql_select_db($database_DisneyHebdo, $DisneyHebdo);
$query_titre2 = "SELECT titre FROM auteur WHERE code = '2'";
$titre2 = mysql_query($query_titre2, $DisneyHebdo) or die(mysql_error());
$row_titre2 = mysql_fetch_assoc($titre2);
$totalRows_titre2 = mysql_num_rows($titre2);

mysql_select_db($database_DisneyHebdo, $DisneyHebdo);
$query_titre3 = "SELECT titre FROM auteur WHERE code = '3'";
$titre3 = mysql_query($query_titre3, $DisneyHebdo) or die(mysql_error());
$row_titre3 = mysql_fetch_assoc($titre3);
$totalRows_titre3 = mysql_num_rows($titre3);

mysql_select_db($database_DisneyHebdo, $DisneyHebdo);
$query_menutitres = "SELECT titre FROM auteur WHERE code = '0'";
$menutitres = mysql_query($query_menutitres, $DisneyHebdo) or die(mysql_error());
$row_menutitres = mysql_fetch_assoc($menutitres);
$totalRows_menutitres = mysql_num_rows($menutitres);
?>



<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateBeginEditable name="doctitle" -->
<title>Disney Hebdo</title>
<!-- TemplateEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
</head>

<body bgcolor="#2E3AAB">


<table width="100%" height="89%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="4%"><img src="angle_haut_gauche.gif" width="40" height="40" align="bottom" />
</td>
<td width="16%" height="9%"><img src="haut.gif" width="100%" height="40" />
<div align="center"></div>
<div align="center"></div></td>
<td height="40"><img src="haut.gif" width="100%" height="40" /></td>
<td height="40"><img src="haut.gif" width="100%" height="40" /></td>
<td height="40"><img src="haut.gif" width="100%" height="40" /></td>
<td width="40"><img src="angle_haut_droite.gif" width="40" height="40" /></td>
</tr>
<tr>
<td width="4%" height="9%"><img src="gauche.gif" width="40" height="100%" /></td>
<td colspan="4"><div align="center"><img src="images/logo.gif" width="247" height="33" /></div></td>
<td width="40"><img src="droite.gif" width="40" height="100%" /></td>
</tr>
<tr>
<td width="4%" height="15%"><img src="gauche.gif" width="40" height="100%" /></td>
<td colspan="4"><hr />
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center"><strong><font color="#FFFFFF" size="4">A la
Une</font></strong></div></td>
<td><div align="center"><strong><font color="#FFFFFF" size="4">Parcs</font></strong></div></td>
<td><div align="center"><strong><font color="#FFFFFF" size="4">Animation</font></strong></div></td>
<td><div align="center"><strong><font color="#FFFFFF" size="4">Cin&eacute;</font></strong></div></td>
<td><div align="center"><strong><font color="#FFFFFF" size="4">T&eacute;l&eacute;vision</font></strong></div></td>
<td><div align="center"><strong><font color="#FFFFFF" size="4">Soci&eacute;t&eacute;
M&egrave;re</font></strong></div></td>
<td><div align="center"><strong><font color="#FFFFFF" size="4">Divers</font></strong></div></td>
<td><div align="center"><strong><font color="#FFFFFF" size="4">Sur le
Web</font></strong></div></td>
</tr>
</table>
<hr /></td>
<td width="40"><img src="droite.gif" width="40" height="100%" /></td>
</tr>
<tr>
<td width="4%" height="28%"><img src="gauche.gif" width="40" height="100%" /></td>
<td valign="top" rowspan="2"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td><img src="angle_haut_gauche.gif" width="40" height="40" /></td>
<td><img src="haut.gif" width="100%" height="40" /></td>
<td><img src="angle_haut_droite.gif" width="40" height="40" /></td>
</tr>
<tr>
<td><img src="gauche.gif" width="40" height="100%" /></td>
<td rowspan="2"><div align="center"><strong><font color="#FFFFFF" size="4">Edito
</font></strong> </div>
<hr /> <div align="center"><font color="#FFFFFF"><?php echo $row_edito['edito']; ?></font></div></td>
<td><img src="droite.gif" width="40" height="100%" /></td>
</tr>
<tr>
<td width="40"><img src="gauche.gif" width="40" height="100%" /></td>
<td><img src="droite.gif" width="40" height="100%" /></td>
</tr>
<tr>
<td><img src="angle_bas_gauche.gif" width="40" height="40" /></td>
<td><img src="bas.gif" width="100%" height="40" /></td>
<td><img src="angle_bas_droite.gif" width="40" height="40" /></td>
</tr>
</table></td>
<td valign="top" colspan="2"><table width="90%" border="0" align="center" valign="top" cellpadding="0" cellspacing="0">
<tr>
<td width="5%"><img src="angle_haut_gauche.gif" width="40" height="40" /></td>
<td width="90%"><img src="haut.gif" width="100%" height="40" /></td>
<td width="5%"><img src="angle_haut_droite.gif" width="40" height="40" /></td>
</tr>
<tr>
<td><img src="gauche.gif" width="40" height="100%" /></td>
<td><div align="center"><strong><font color="#FFFFFF" size="6"><?php echo $row_titre['titre']; ?></font></strong></div></td>
<td><img src="droite.gif" width="40" height="100%" /></td>
</tr>
<tr>
<td><img src="angle_bas_gauche.gif" width="40" height="40" /></td>
<td><img src="bas.gif" width="100%" height="40" /></td>
<td><img src="angle_bas_droite.gif" width="40" height="40" /></td>
</tr>
</table></td>
<td valign="top" rowspan="2"> <table width="100%" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td><img src="angle_haut_gauche.gif" width="40" height="40" /></td>
<td><img src="haut.gif" width="100%" height="40" /></td>
<td><img src="angle_haut_droite.gif" width="40" height="40" /></td>
</tr>
<tr>
<td><img src="gauche.gif" width="40" height="100%" /></td>
<td rowspan="2"><div align="center"><strong><font color="#FFFFFF" size="4">A
voir &eacute;galement </font></strong></div>
<hr /> <div align="center"><font color="#FFFFFF">
<?php
// on se connecte à MySQL
$db = mysql_connect('localhost', 'root', '');

// on sélectionne la base
mysql_select_db('disneyhebdo',$db);

// on crée la requête SQL
$sql = 'SELECT titre FROM auteur WHERE code = 0';

// on envoie la requête
$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());

// on fait une boucle qui va faire un tour pour chaque enregistrement
while($data = mysql_fetch_assoc($req))
{
// on affiche les informations de l'enregistrement en cours
echo '<b>'.$data['titre'].'<br><br></b>';

}

// on ferme la connexion à mysql
mysql_close();
?>
</font></div></td>
<td><img src="droite.gif" width="40" height="100%" /></td>
</tr>
<tr>
<td width="40"><img src="gauche.gif" width="40" height="100%" /></td>
<td><img src="droite.gif" width="40" height="100%" /></td>
</tr>
<tr>
<td height="40"><img src="angle_bas_gauche.gif" width="40" height="40" /></td>
<td><img src="bas.gif" width="100%" height="40" /></td>
<td><img src="angle_bas_droite.gif" width="40" height="40" /></td>
</tr>
</table></td>
<td width="40"><img src="droite.gif" width="40" height="100%" /></td>
</tr>
<tr>
<td width="4%" height="28%"><img src="gauche.gif" width="40" height="100%" /></td>
<td valign="top" width="27%"> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5%"><img src="angle_haut_gauche.gif" width="40" height="40" /></td>
<td width="90%"><img src="haut.gif" width="100%" height="40" /></td>
<td width="5%"><img src="angle_haut_droite.gif" width="40" height="40" /></td>
</tr>
<tr>
<td><img src="gauche.gif" width="40" height="100%" /></td>
<td><div align="center"><strong><font color="#FFFFFF" size="6"><?php echo $row_titre2['titre']; ?></font></strong></div></td>
<td><img src="droite.gif" width="40" height="100%" /></td>
</tr>
<tr>
<td><img src="angle_bas_gauche.gif" width="40" height="40" /></td>
<td><img src="bas.gif" width="100%" height="40" /></td>
<td><img src="angle_bas_droite.gif" width="40" height="40" /></td>
</tr>
</table></td>
<td valign="top" width="27%"> <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5%"><img src="angle_haut_gauche.gif" width="40" height="40" /></td>
<td width="90%"><img src="haut.gif" width="100%" height="40" /></td>
<td width="5%"><img src="angle_haut_droite.gif" width="40" height="40" /></td>
</tr>
<tr>
<td><img src="gauche.gif" width="40" height="100%" /></td>
<td><div align="center"><strong><font color="#FFFFFF" size="6"></font></strong></div>
<div align="center"><strong><font color="#FFFFFF" size="6"><?php echo $row_titre3['titre']; ?></font></strong></div></td>
<td><img src="droite.gif" width="40" height="100%" /></td>
</tr>
<tr>
<td><img src="angle_bas_gauche.gif" width="40" height="40" /></td>
<td><img src="bas.gif" width="100%" height="40" /></td>
<td><img src="angle_bas_droite.gif" width="40" height="40" /></td>
</tr>
</table></td>
<td width="40"><img src="droite.gif" width="40" height="100%" /></td>
</tr>
<tr>
<td width="4%" height="11%"><img src="angle_bas_gauche.gif" width="40" height="40" /></td>
<td><img src="bas.gif" width="100%" height="40" /></td>
<td><img src="bas.gif" width="100%" height="40" /></td>
<td><img src="bas.gif" width="100%" height="40" /></td>
<td><img src="bas.gif" width="100%" height="40" /></td>
<td><img src="angle_bas_droite.gif" width="40" height="40" /></td>
</tr>
</table>
</body>
</html>
<?php
mysql_free_result($edito);

mysql_free_result($titre);

mysql_free_result($titre2);

mysql_free_result($titre3);

mysql_free_result($menutitres);
?>

Alors quel est le problème me direz vous ?

Et bien tout simplement quand je teste sous mozilla Firefox tout est parfaitement aligné, sous internet explorer ce n'est plus le cas.
Quelqu'un sait-il d'où cela vient ?