Forum-webmaster
Technique - programmation => HTML / CSS / XHTML => Message commencé par: geodesign le le 21-09-2009 a 11:34:46

Titre: Bloc principal non centré sur IE
Posté par: geodesign le le 21-09-2009 a 11:34:46

Bonjour à tous,

je fais appel à vous car je dois rendre un projet pour l'école d'ici peut et je n'ai toujours pas trouvé de solution pour centrer mon bloc principal sur IE toute version confondue et testée depuis IE5 à IE8 avec IE Tester

Par contre sur firefox Mac, windows ainsi que Opera et Safari aucun problème le bloc ce centre comme prévu dans ma feuille de style

Alors que faire pour que mon bloc principal ce centre sur IE comme sur les autres navigateur voici l'url de mon site si vous pouvez y jeter un œil ce serai vraiment très sympa car là je suis à cour d'idée

voici l'url du site en question hébergé sur le site de l'école
http://www.isl.be:20080/lacroixg (http://www.isl.be:20080/lacroixg)

Si vous voulez plus d'infos n'hésiter pas à m'envoyer un mail sur
info@geodesign.be


Code:
html {
   /*background: #312118;*/
}

body {
   background-image: url(../images/body.png);
   font-family: Tahoma,Arial, Helvetica, sans-serif;
   font-size: 11px;
   line-height: 1.5em;
   /*display: table;*/
   color: #ACA099;            /* couleur principal du site un gris assez claire */
   /*text-align:center;*/
}

/*
#body_center {
   text-align:left;
   position: relative;
   width: 866px;
   max-width: 866px;
   border: 1px solid red;
   margin: 0px auto 0px auto;
}
*/

a{ color: #FFFFFF; text-decoration:none; }                  /* COULEUR ROUGE DES LIENS TITRE DATES DES NEWS */

a:hover{ color: #ff7f01; text-decoration:underline; }

.container {
   /*background-color: #111111;*/
   background: url(../images/container.png) repeat top left;
   width: 866px;
   margin: 0px auto 0px auto;
}


p.error{
   color:red;
   font-weight:bold;
   font-size:14px;
   padding:5px;
   border: 1px solid red;
   background-color: pink;   
}

#content {
   width:846px;
   padding:10px;
}

#content_left {                              
   width: 520px;         /* contenu de la section de la page d'accueil de gauche */
   float:left;
   padding: 0;
}

#content_right {
   float: right;
   width: 300px;
}

#header {
   margin: auto;
   width: 866px ;
   height: 231px ;
   margin-bottom: 10px;
}

#header a{
   display:block;
   text-indent: -20000px;
   width: 866px ;
   height: 231px ;
   background: url(../images/logo_drift2.png) no-repeat;
}

/********************************** Menu ***********************************************************/
#menu {
   width: 866px;
   height: 40px;
   margin: 0 auto 10px auto;
   padding: 0;
}

#menu_barre {
   
   height: 40px;
   margin-bottom: 10px;
   padding: 0;
   background-image: url(../images/menu-red.png);   
}

#menu ul {

   list-style: none;
   display: inline;
}

#menu li {
   float:left;
}

#menu li a {
   float: left;
   display: block;
   text-decoration: none;
   font-family: Tahoma;
   font-size: 10px;
   margin: 0 4px 0 0;
   padding: 0 10px;
   height: 33px;
   line-height: 33px;
   text-align: center;
}

#menu li.separator{
   line-height: 33px;
}

#menu li.current a, #menu li a:hover{
   /*color: #ACA099;*/                                                                     /* couleur des menus lors du passage de la souris */
   color: #FF0000;
}

/*
#menu li.current a b, #menu li a:hover b{

}

End OF menu*/

.fade {
   margin: 0;
   padding: 0;
}

#contentLarge{
   clear: both;
   text-align: justify;
}

.affich_date{
   color: #FF0000;                     /* affichage de toute les dates et titres de news en rouge */
   font-weight: bold;
}

.section_2_mid img, #contentLarge img{
   float: left;
   margin: 0 10px 3px 0;
   padding: 0;
}

* html .section_2_mid img{
   margin-bottom: -15px;
}

.section_2_sub {
   width: 332px;
   margin: 10px 0 0 0;
   padding: 0;
}

.section_2_sub_top {
   width: 332px;
   height: 11px;
   margin: 0;
   padding: 0;
}

.section_2_sub_mid {
   width: 302px;
   background: #4a362a;
   margin: 0;
   padding: 0 15px;
}

.Adm_section_2_sub_mid {
   width: 602px;
   background: #4a362a;
   margin: 0;
   padding: 0 15px;
}

* html .section_2_sub_mid {
   margin-top: -4px;
}

.section_2_sub_bottom {
   height: 7px;
   margin: 0;
   padding: 0;
}

.cleaner_with_height {
   clear: both;
   height: 1px;
}

#footer {
   color: #fff;
   background-image: url(../images/menu-red.png) ;
   margin-top: 20px;
   padding: 5px 0;
   text-align: center;
}

#footer a{
   color: #fff;
   text-decoration: none;
}

#footer a:hover{
   color: #fff;
   text-decoration: underline;   
}

.cleaner, .clearfix:after {
   content:".";
   display:block;
   height:0;
   clear:both;
   visibility:hidden;
}
.cleaner, .clearfix {display:inline-block;}
/* Hide from IE Mac \*/
.cleaner,    .clearfix {display:block;}
/* End hide from IE Mac */

/*** PHOTOS ***/

/*
#photos
{
   
}
*/

#photos .category{
   float:left;
   width: 120px;
   height:150px;
   margin: 5px 10px;
   text-align: center;
      
}

#photos .photo{
   float:left;
   width: 120px;
   height:120px;
   margin: 5px 10px;
   text-align: center;
      
}

/** NEws **/
.blockTitle {
   font-size: 16px;
   font-weight: bold;   
}

.news_block{
}

.news_block .news{
   margin: 10px 0;
}

.news_block .title{
   font-weight: bold;
   margin-bottom: 5px;   
}

.news_block .content img{
   float:left;
   margin: 0 4px 4px 0;   
}

#news .entry {
   padding: 10px;
   margin-bottom: 10px;
   border-bottom: 1px solid white;
}
#news .entry h2{
   font-size:16px;
   color:red;
}

#news .entry img{
   float:left;
   margin: 0 6px 6px 0;   
}

#news .entry h2 span.date{
   float:left;
   padding-right:10px;
}
#news .entry h2 span.date:after{
   content:' - ';
}


/*** ADMIN ***/
.adminTable
{
   border-collapse: collapse;
   border: 1px solid white;
}

.adminTable img{
   border:none;   
}

.adminTable th{
   background-color: #000;
   color: #FFF;
   
}

.adminTable td, .adminTable th{
   padding: 3px;   
   border: 1px solid white;
   
}

.adminTable .impair td{
   background-color: #333;
}

#logout {
margin-left: 780px;

}

img {
border: none;
}

Titre: Re:Bloc principal non centré sur IE
Posté par: MarvinLeRouge le le 23-09-2009 a 11:43:14

Salut,

Ton bloc principal est centré sous IE6; or, IE6 date de 2001 : on va peut-être pas remonter la compatibilité jusqu'à la préhistoire, non ? ;D ::)
Sinon, pour IE 5.5, il me semble qu'il faut mettre un text-align : center sur l'élément parent de celui à centrer.

H.S. : Tu as quelques petites erreurs assez faciles à résoudre dans ton html : encodage, attributs mal orthographiés ...

Titre: Re:Bloc principal non centré sur IE
Posté par: geodesign le le 23-09-2009 a 12:18:34

oui merci bcp MarvinLeRouge

j'ai enfin résolut le problème
car IE interprète le text-align: center; pour un "déplace tout mes blocs"

Alors j'ai centré la totalité de mon site avec un div

et j'ai replacé mon texte et autres petites choses grâce à un text-align: left;

Sinon tu as raison pour les petites erreurs html: je suis en train de tester toute mes page grâce au plugin W3C de firefox

encore merci pour ta réponse


Forum-webmaster | Actionné par YaBB SE
© 2001-2003, YaBB SE Dev Team. Tous droits réservés.