Partage
  • Partager sur Facebook
  • Partager sur Twitter

[xhtml et css] Image n'affiche pas

Sujet résolu
    8 avril 2006 à 1:20:46

    bonjour,

    J'ai ce code dans une page
    <div class="fondreligion" id="corps">

    et celui ci dans une autre pages
    <div class="fondanimaux" id="corps">

    etc...

    et tout ceci est référencer à une page CSS.
    Voici un bout de code:
    #corps.fondreligion
    {
            background-image: url("bg/religion.jpg");
            background-repeat:repeat-y;
    }

    #corps.fondanimaux
    {
            background-image: url("bg/animaux.jpg");
            background-repeat:repeat-y;
    }


    voici sous quel forme sont mes pages:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
       <head>
           <title>Religion</title>
           <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
               <link rel="stylesheet" media="screen" type="text/css" title="stylepage" href="stylepage.css" />
       </head>

       <body>

           <!-- L'en-tête -->

           <div id="en_tete">
               <? include("**.php"); ?>
           </div>

           <!-- Les menus -->

           <div id="menu">       
                   
                <? include("***.php"); ?>
                 
           
           </div>

           <!-- Le corps -->

           <div class="fondreligion" id="corps">

               </div>

           <!-- Le pied de page -->

           <div id="pied_de_page">
               
           </div>

       </body>
    </html>


    Mon problème est que sous IE :pirate:;) il n'affiche pas l'image de fond dans le corps sauf pour une page sur 10.

    Est-ce que c'est normale?

    Moi je pense que oui et j'ai vérifier le reste du code et il est pareille.
    • Partager sur Facebook
    • Partager sur Twitter
    Eric
      8 avril 2006 à 1:30:28

      Citation : Épiq


      #corps.fondreligion
      {
              background-image: url("bg/religion.jpg");
              background-repeat:repeat-y;
      }

      #corps.fondanimaux
      {
              background-image: url("bg/animaux.jpg");
              background-repeat:repeat-y;
      }

      Il y a un problème là..

      Tu n'a pas besoin, pour sélectionner le div .fondreligion , de mettre #corps devant...

      .fondreligion
      {
              background-image: url("bg/religion.jpg");
              background-repeat:repeat-y;
      }

      .fondanimaux
      {
              background-image: url("bg/animaux.jpg");
              background-repeat:repeat-y;
      }


      devrait marcher aussi bien...

      Ensuite, il y a quelque chose de trèss gros dans ton code...
      Deux id sur une même page! Sacrilège! Blasphème!

      Un même id ne doit jamais être présent deux fois sur une seule page!
      • Partager sur Facebook
      • Partager sur Twitter
        8 avril 2006 à 1:48:36

        Tout fonctionne
        merci bien
        • Partager sur Facebook
        • Partager sur Twitter
        Eric

        [xhtml et css] Image n'affiche pas

        × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
        × Attention, ce sujet est très ancien. Le déterrer n'est pas forcément approprié. Nous te conseillons de créer un nouveau sujet pour poser ta question.
        • Editeur
        • Markdown