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

  FORUM HardWare.fr
  Programmation
  HTML/CSS

  IE/Firefox - C'est normal toutes ces différences, là ?

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

IE/Firefox - C'est normal toutes ces différences, là ?

n°1528273
did-54
Posté le 14-03-2007 à 11:35:05  profilanswer
 

Hello !
 
J'ai un petit soucis avec mon design. Je ne sais vraiment pas d'ou ca vient, mais Firefox ne calcule pas les largeurs de la meme facon qu'IE :D
D'après moi, c'est IE qui a raison, à savoir que si je mets un bloc de 150 et un de 650px de large dans un bloc de 800px de large, ca passe (sans margin), mais firefox n'est pas d'accord avec ca.
 
voilà le css :
 
 

Code :
  1. body {
  2.   margin:0px;
  3.   padding:0px;
  4.   text-align:center;
  5.   background-color:#0F0900;
  6.   font-family: Verdana;
  7.   font-size:12px;
  8.   color:#FFFCC9;
  9. }
  10. .menuList{
  11.   margin: 0px;
  12.   padding: 0px;
  13.   display: inline;
  14.   list-style-type: none;
  15.   text-align:right;
  16. }
  17. .title {
  18.   margin:0px 0px 0px 100px;
  19.   padding:0px;
  20.   text-align:right;
  21.   border-bottom:1px solid #CCFF6D;
  22.   color:#CCFF6D;
  23. }
  24. #header {
  25.   background:url(./images/header2.jpg);
  26.   padding:10px 0px 0px 0px;
  27.   height:200px;
  28.   margin:0px;
  29. }
  30. #main {
  31.   text-align:justify;
  32.   background-color:#211400 ;
  33.   margin-bottom:0px;
  34.   margin-left:auto;
  35.   margin-right:auto;
  36.   width:800px;
  37.   border-left:1px solid #D8D488;
  38.   border-right:1px solid #D8D488;
  39.   overflow:auto;
  40. }
  41. #content {
  42.   margin:0px;
  43.   border-top:1px solid #D8D488;
  44.   background-color:#211400;
  45.   float:left;
  46.   padding:0px 20px 20px 20px;
  47.   width:610px;
  48. }
  49. #right_col {
  50.   margin:0px;
  51.   padding:0px;
  52.   float:right;
  53.   background:url(./images/header2.jpg) no-repeat;
  54.   background-position: -650px -220px;
  55.   width:150px;
  56. }
  57. #menu {
  58.   float:right;
  59.   margin:0px;
  60.   padding:100px 0px 100px 0px;
  61.   border-bottom:1px solid #D8D488;
  62.   border-left:1px solid #D8D488;
  63. }
  64. #menu a {
  65.   background-color:#ffffff;
  66.   margin-bottom:2px;
  67.   width:125px;
  68.   float:right;
  69.   text-align:right;
  70.   padding:0px;
  71.   display:block;
  72.   height:25px;
  73.   padding-right:20px;
  74.   color:#3D2301;
  75. }
  76. #menu li {
  77.   float:right;
  78.   padding:0px;
  79.   margin:0px;
  80.   background-color:#ffffff;
  81.   filter:alpha(opacity=60);
  82.   opacity:0.5;
  83. }


 
En gros, j'ai mon conteneur main centré sur la page, de 800px de large. Dedans je prends un div "content" de 610px à gauche et un autre "right_col" de 150px. Dans cette configuration là c'est niquel sous firefox, mais pas sous IE puisqu'il manque 800 - 610 - 150 = 40px !
 
Heeeelp! :(
 
 
 

mood
Publicité
Posté le 14-03-2007 à 11:35:05  profilanswer
 

n°1528275
did-54
Posté le 14-03-2007 à 11:43:54  profilanswer
 

Je viens de voir qu'en fait le problème vient du padding.
Sous firefox, si je mets un padding de 20, ca augmente la largeur du bloc de 40. Sous IE, ca conserve la largeur.

n°1528319
masklinn
í dag viðrar vel til loftárása
Posté le 14-03-2007 à 13:22:13  profilanswer
 

http://www.quirksmode.org/css/quirksmode.html
 
bonne lecture


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?
n°1528467
did-54
Posté le 14-03-2007 à 15:51:25  profilanswer
 

Excellent.
 
Quel con, j'avais oublié le DocType, m'enfin au moins maintenant je sais vraiment à quoi ca sert :D


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

  IE/Firefox - C'est normal toutes ces différences, là ?

 

Sujets relatifs
différence d'affichage entre firefox et IE sur mon site...Extension firefox remplaçant les url
IE et Firefox...pb à l'affichagebackground-color d'une div différent sous IE et firefox ?
Différence d'affichage Firefox/IE ??Difference affichage IE/firefox (encore !!!!!!!!!!!)
Différence IE/Firefox [Résolu]Probleme de différence firefox/ie
[C#] [Résolu] Comment communiquer avec une dll c++XHTML strict 1.0 positionnement firefox ie
Plus de sujets relatifs à : IE/Firefox - C'est normal toutes ces différences, là ?


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)