dureiken Posted July 25, 2006 Share Posted July 25, 2006 Bonjour, j'essaie de faire un petit site internet mais je rencontre un probleme de decalage sous IE, et pas sous Firefox, et je n'arrive pas a regler ce souci : le code de la page de test <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml?quot; xml:lang="fr" > <head> <title>Informations Réseau</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" media="screen" type="text/css" title="style" href="style.css" /> </head> <body> <fieldset class=infos > <legend>Informations</legend> test </fieldset> <fieldset class=infos > <legend>Informations</legend> test </fieldset> <?php ?> </body> </html?gt; et le style.css en question : .infos { margin:auto; width:600px; } ce qui donne ca : et j'ai donc toujours le même decalage sous IE mais pas firefox, si quelqu'un peut m'aider ? merci d'avance Link to comment Share on other sites More sharing options...
Quarky Posted July 25, 2006 Share Posted July 25, 2006 Ca marche en mettant à chaque fieldset une div comme parent mais bon je trouve pas ca top au niveau sémantique .... Le code : <div> <fieldset class="infos" > <legend>Informations</legend> test </fieldset> </div> <div> <fieldset class="infos" > <legend>Informations</legend> test </fieldset> </div> Link to comment Share on other sites More sharing options...
dureiken Posted July 25, 2006 Author Share Posted July 25, 2006 ah oui, merci, si il y a mieux je suis preneur sinon c'est pas grave, c'est toujours mieux que d'avoir des gros soucis :) Link to comment Share on other sites More sharing options...
Quarky Posted July 25, 2006 Share Posted July 25, 2006 Après réfléxion, c'est tout bête : suffit de faire ceci (sans les div dans le html) .infos { margin : auto; width : 600px; display : block; } Au fait pourquoi déclarer une classe ? Tu peux très bien remplacer ".infos" par "fieldset" à moins que tu n'utilises des fieldset ailleurs et n'ayant pas ces propriétés. Link to comment Share on other sites More sharing options...
dureiken Posted July 25, 2006 Author Share Posted July 25, 2006 oui j'utilise fieldset ailleurs sur le vrai site :) et merci beaucoup ca a l'air de marcher avec le block !!! merci Link to comment Share on other sites More sharing options...
Quarky Posted July 25, 2006 Share Posted July 25, 2006 Ca devient une mauvaise habitude pour moi mais bon ...... - edit - Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.