IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Mise en page CSS Discussion :

Balise lien inefficace sur IE


Sujet :

CSS

  1. #1
    Membre éclairé Avatar de keub51
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    349
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 349
    Par défaut Balise lien inefficace sur IE
    bon voila je sais pas si je suis retombé bien bas en oubliant un truc ou quoi mais voila, j'ai un menu constitué de simple <a href "...">.... qui fonctionne sous firefox mais pas sous ie ... je demande rien de bien compliqué pourtant lol voila mon code :

    voici comment japelle mon menu dans mes pages :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
     
    <!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>PC Service Plus</title>
           <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	   <link rel="stylesheet" media="screen" type="text/css" title="Exemple" href="style.css" /> 
    	   <meta http-equiv="refresh" content="5; URL=ajout_client.php">
        </head>
        <body>
        <!-- L'en-tête -->
        <div id="en_tete">
        </div>
    			<?php
    	include("menu2.php");
    	?>
    	<!-- Le corps -->
     <div id="corps">
    voici menu2.php :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    <div class="menu">
    <div class="headmenu">
    </div>
    <div class="inmenu">
    <a href="ajout_produit.php">Ajout d'un produit</a><br/>
    <a href="recherche_produit.php">Recherche d'un produit</a><br/>
    <a href="ajout_client.php">Ajouter un client</a><br/>
    <a href="achat_client.php">Achat d'un client</a><br/>
    <a href="recherche_client.php">Recherche d'un client</a><br/>
    <a href="liste_client.php?choix=nom">Liste des client</a><br/>
    <a href="liste_produit.php?choix=type">Liste des produit</a><br/>
    <a href="garantie.php?client=">Garantie d'un client</a><br/>
    <a href="reparation.php">Fiche réparations</a><br/>
    <a href="recherche_reparation.php">Recherche réparation</a><br/>
    <a href="liste_réparations.php?choix=id">Liste réparations</a><br/>
    <br/><br/>
    </div>
    <div class="footmenu">
    </div>
    </div>
    et le style :
    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
     
    /* Le menu */
     
    .menu
    {
       float : left;
       width: 120px;
       text-align:left;
       /*border : 2px solid black;*/
       margin-bottom:10px;
    }
     
    .headmenu
    {
       background-image: url("images/upMenu1.JPG");
       /*border : 2px solid black;*/
       height : 40px;
       width: 124px;
       text-align : center;
       padding-top : 20px; 
       font-family : "comic sans ms",arial;
    }
     
    .inmenu
    {
       /*border : 2px solid black;*/
       width: 130px;
    }
     
    .inmenu a
    {
    font-size : 10px;
    padding-left: 10px;
    text-decoration : none;
    color : #47ACFF;
    }
     
    .inmenu a:hover
    {
    font-size : 10px;
    padding-left: 20px;
    color : black;
    }

  2. #2
    Modérateur
    Avatar de Bisûnûrs
    Profil pro
    Développeur Web
    Inscrit en
    Janvier 2004
    Messages
    9 931
    Détails du profil
    Informations personnelles :
    Âge : 42
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Janvier 2004
    Messages : 9 931
    Par défaut
    Oui et ?

    Le problème c'est quoi ?

  3. #3
    Membre éclairé Avatar de keub51
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    349
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 349
    Par défaut
    et bien comme je l'ai di au dessus ce menu constitué de simple lien <a> fonctionne sous firefox mais pas sur ie .. sous ie j'ai beau cliquer dessus c'est comme si c'était du simple texte ... donc mon petit menu est inutilisable sous ie ...:'( pourquoi ?

  4. #4
    Modérateur
    Avatar de Bisûnûrs
    Profil pro
    Développeur Web
    Inscrit en
    Janvier 2004
    Messages
    9 931
    Détails du profil
    Informations personnelles :
    Âge : 42
    Localisation : France, Rhône (Rhône Alpes)

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Janvier 2004
    Messages : 9 931
    Par défaut
    Aucun problème chez moi avec ce code.

    Un autre élément dans ta page doit interférer.

  5. #5
    Membre confirmé Avatar de bustaja
    Profil pro
    Inscrit en
    Avril 2007
    Messages
    109
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Nord (Nord Pas de Calais)

    Informations forums :
    Inscription : Avril 2007
    Messages : 109

  6. #6
    Membre éclairé Avatar de keub51
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    349
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 349
    Par défaut
    j'ai essayé avec des <br> tout simple rien qui change ...

    j'ai regardé ce qui pouvait interférer mais je ne trouve rien de bizarre... regardez par vous meme :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
     
    <!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>PC Service Plus</title>
           <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	   <link rel="stylesheet" media="screen" type="text/css" title="Exemple" href="style.css" /> 
    <script language="JavaScript">
    function verifier_formulaire()
    {
    if(document.formulaire.num.value == "" &&
    document.formulaire.marque.value == "" &&
    document.formulaire.date.value == "" &&
    document.formulaire.client.value == "" &&
    document.formulaire.type.value == "" &&
    document.formulaire.se.value == "" &&
    document.formulaire.nb.value == "" &&
    document.formulaire.desc.value == "")
       alert("Veuillez entrer au moins un critère de recherche !");
    else
    	document.formulaire.submit();
    }
    </script>
        </head>
        <body>
        <!-- L'en-tête -->
        <div id="en_tete">
    </div>
        </div>
    		<?php
    	include("menu2.php");
    	?>
    	<!-- Le corps -->
     
        <div id="corps">


    si vous trouvez quelquechose ...

  7. #7
    Membre éclairé Avatar de keub51
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    349
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 349
    Par défaut
    j'ai trouvé quelquechose mais je ne comprends toujhours pas le comportement de IE :

    voici menu2.php :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    <div class="menu">
     
    <div class="headmenu">
     
    </div>
    <div class="inmenu">
     
    <a href='ajout_produit.php'>Ajout d'un produit</a><br>
    <a href="recherche_produit.php">Recherche d'un produit</a><br>
    <a href="ajout_client.php">Ajouter un client</a><br>
    <a href="achat_client.php">Achat d'un client</a><br>
    <a href="recherche_client.php">Recherche d'un client</a><br>
    <a href="liste_client.php?choix=nom">Liste des client</a><br>
    <a href="liste_produit.php?choix=type">Liste des produit</a><br>
    <a href="garantie.php?client=">Garantie d'un client</a><br>
    <a href="reparation.php">Fiche réparations</a><br>
    <a href="recherche_reparation.php">Recherche réparation</a><br>
    <a href="liste_réparations.php?choix=id">Liste réparations</a><br>
    <br><br>
    </div>
    <div class="footmenu">
    </div>
    </div>
    le style css
    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    .menu
    {
       float : left;
       width: 124px;
       border : 2px solid black;
       margin-bottom:10px;
    }

    lorsque je supprime <div class="menu"> et sa </div> ca fonctionne ... mais je ne peux pas me permettre de le supprimer car c'est lui qui possede le float : left, sauf si japplique ce style aux balise dans <div class="menu"> enfin bon jaimerais comprendre tout de même ce comportement plus que bizarre ... ou mon anerie plus que c*****

  8. #8
    Membre éclairé Avatar de keub51
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    349
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 349
    Par défaut
    ya un probleme avec le float : left quan je l'enleve le corps se place en dessous mais le menu fonctionne et quan je le laisse le menu ne fonctionne pas mais le style correspond ... aide me !!!!

  9. #9
    Membre éclairé Avatar de keub51
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    349
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 349
    Par défaut
    avec un float : right ca foinctionne ... mais pas left ... pourquoi ???

  10. #10
    Membre confirmé Avatar de bustaja
    Profil pro
    Inscrit en
    Avril 2007
    Messages
    109
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Nord (Nord Pas de Calais)

    Informations forums :
    Inscription : Avril 2007
    Messages : 109
    Par défaut
    Citation Envoyé par keub51
    avec un float : right ca foinctionne ... mais pas left ... pourquoi ???
    Peut-être que I.E l'interprète pas de la même façon que FireFox...

    Des fois, c'est comme ça...

  11. #11
    Membre éclairé Avatar de keub51
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    349
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 349
    Par défaut
    bah oué je vois ca mais il y a surement une technique ou une subtilité pour palier a ce defaut ... c'est pour cela que je continue dapeller a l'aide sur ce forum !

  12. #12
    Membre confirmé Avatar de bustaja
    Profil pro
    Inscrit en
    Avril 2007
    Messages
    109
    Détails du profil
    Informations personnelles :
    Âge : 40
    Localisation : France, Nord (Nord Pas de Calais)

    Informations forums :
    Inscription : Avril 2007
    Messages : 109
    Par défaut
    Citation Envoyé par keub51
    bah oué je vois ca mais il y a surement une technique ou une subtilité pour palier a ce defaut ... c'est pour cela que je continue dapeller a l'aide sur ce forum !
    Bah écoute, essaie d'ajouter "clear:left" à ta CSS... on sait jamais...

  13. #13
    Rédacteur
    Avatar de MasterOfChakhaL
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juin 2004
    Messages
    2 147
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 45
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Juin 2004
    Messages : 2 147
    Par défaut
    Salut,

    Serait-il possible de mettre ta page en lgne et de nous filer un lien?
    Ca sera plus facile pour voir ce qui ne va pas avec ta page...
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    N'oubliez pas de cliquer sur quand votre question à trouvé une solution.

    Si vous n'avez pas encore lu les règles du club, mieux vaut tard que jamais!

  14. #14
    Membre Expert
    Avatar de Candygirl
    Femme Profil pro
    Inscrit en
    Juillet 2006
    Messages
    1 912
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 53
    Localisation : Suisse

    Informations forums :
    Inscription : Juillet 2006
    Messages : 1 912
    Par défaut
    Je pense qu'il est indispensable de connaître le css appliqué à ton #corps pour pouvoir te répondre. Tu l'as positionné avec un margin-left de la taille du menu (comme je suppose peut-être vu ton problème) ou en float ?

    De même d'avoir la structure html générée (pas le php) de ta page entière ou, encore mieux, un lien pour étudier le problème serait plus productif.
    Les bons réflexes:
    • avant de poser une question:
      règles | faq | tutoriels | recherche
    • clarté, politesse, vocabulaire et orthographe soignés = efficacité
    • remercier ceux qui ont pris le temps d'aider et :resolu: si c'est le cas

  15. #15
    Membre éclairé Avatar de keub51
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    349
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 349
    Par défaut
    donc voici le code source généré d'une de mes pages :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    <!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>PC Service Plus</title>
           <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	   <link rel="stylesheet" media="screen" type="text/css" title="Exemple" href="style.css" /> 
        </head>
        <body>
        <!-- L'en-tête -->
        <div id="en_tete">
        </div>
     
    <div class="menu">
     
    <div class="headmenu">
     
    </div>
    <div class="inmenu">
     
    <a href='ajout_produit.php'>Ajout d'un produit</a><br>
    <a href="recherche_produit.php">Recherche d'un produit</a><br>
    <a href="ajout_client.php">Ajouter un client</a><br>
    <a href="achat_client.php">Achat d'un client</a><br>
    <a href="recherche_client.php">Recherche d'un client</a><br>
    <a href="liste_client.php?choix=nom">Liste des client</a><br>
    <a href="liste_produit.php?choix=type">Liste des produit</a><br>
    <a href="garantie.php?client=">Garantie d'un client</a><br>
    <a href="reparation.php">Fiche réparations</a><br>
    <a href="recherche_reparation.php">Recherche réparation</a><br>
    <a href="liste_réparations.php?choix=id">Liste réparations</a><br>
    <a href="factures.php">Recherche facture</a><br>
    <br><br>
    </div>
    <div class="footmenu">
    </div>
    </div>
    	<!-- Le corps -->
     
        <div id="corps">
    		<div class="headcorps">
    		<h1>Recherche d'une facture</h1>
    		</div>
    		<div class="incorps">
     
    <form name = "formulaire" action = "factures.php" method ="get">
    Entrez le numéro de facture : 
    <input type=text name="choix"  size=10>
    <input type=submit value = "chercher" size=10 >
    </form>
        		</div>
    		<div class="footcorps"> 
    		</div>
        </div>		   
    <div id="pied_de_page">
        <!-- c'est ici que l'on place le code du pied de la page -->
        </div>    </body>
    </html>

    et voici la css à appliquer :

    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    body
    {
       width: 704px;
       margin: auto;
       margin-top: 20px;
       font-family : "trebuchet MS",arial,default;
     
       /*border : 2px solid black;*/
    }
     
    /* L'en-tête */
     
    #en_tete
    {
       width: 700px;
       height: 86px;
       background-image: url("images/head1.png");
       background-repeat: no-repeat;
       margin-bottom: 10px;
       /*border : 2px solid black;*/
    }
     
    #bar
    {
       width: 700px;
       height: 37px;
       margin-top:2px;
       margin-bottom: 10px;
       text-align : right;
       background-image: url("images/bar.jpg");
    }
     
    /* Le menu */
     
    .menu
    {
      float : left;
       width: 124px;
       margin-bottom:10px;
    }
     
    .headmenu
    {
       background-image: url("images/upMenu1.JPG");
       height : 40px;
       width: 124px;
       text-align : center;
       padding-top : 20px; 
       font-family : "comic sans ms",arial;
    }
     
    .inmenu
    {
       width: 124px;
    }
     
    .inmenu a
    {
    font-size : 10px;
    padding-left: 10px;
    text-decoration : none;
    color : #47ACFF;
    }
     
    .inmenu a:hover
    {
    font-size : 10px;
    padding-left: 20px;
    color : black;
    }
     
    .footmenu
    {
       background-image: url("images/downMenu1.JPG");
       height : 40px;
       width: 124px;
    }
     
    /* Le corps de la page */
     
    #corps
    {  
       margin-bottom:10px;
       margin-top:-12px;
       width: 557px;
       margin-left: 142px;   
    }
     
    .headcorps
    {
       background-image: url("images/headcorps1.PNG");
       height : 85px;
       width: 557px;
    }
     
    .incorps
    { 
    	text-align : center;
    	padding-left : 20px;
        width: 520px;
    }
     
    .tab  th
    { 
    	text-align : center;
    	font-weight : normal;
    	font-size : 12px;
    	background-image :url("images/tab.jpg");
    	width : 100px;
     
    }
    .tab td
    { 
    	text-align : center;
    	font-weight : normal;
    	font-size : 12px;
    }
     
    .incorps a
    { 
    	color : black;
    	text-decoration : none;
    }
     
    #pied_de_page img
    { 
    float : right;
    }
     
    .footcorps
    {
       background-image: url("images/downcorps1.PNG");
       height : 85px;
       width: 557px;
    }
     
    /* Le pied de page (qui se trouve tout en bas, en général pour les copyrights) */
     
    #pied_de_page
    {
       font-family : arial;
       clear:both;
       width: 700px;
       background-image: url("images/down1.PNG");
       height : 86px;
       text-align : center;
       font-size : 10px;
     
       /*border: 2px solid black;*/
    }
     
    h1
    {
    color : #BACCFF;
    text-align : center;
    }
    h3
    {
    color : #BACCFF;
    }

    en esperant que ca vous aide

  16. #16
    Membre Expert
    Avatar de Candygirl
    Femme Profil pro
    Inscrit en
    Juillet 2006
    Messages
    1 912
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 53
    Localisation : Suisse

    Informations forums :
    Inscription : Juillet 2006
    Messages : 1 912
    Par défaut
    J'ai rien eu le temps de tester, mais plutôt que de positionner ton corps avec un margin, place-le en float. Il y a bien des chances que cela résolve ton problème + ça t'évitera le bug des 3px sur IE6:

    Code css : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    #corps
    {  
       margin-bottom:10px;
       margin-top:-12px;
       width: 557px;
       float:right;
    }
    Les bons réflexes:
    • avant de poser une question:
      règles | faq | tutoriels | recherche
    • clarté, politesse, vocabulaire et orthographe soignés = efficacité
    • remercier ceux qui ont pris le temps d'aider et :resolu: si c'est le cas

  17. #17
    Membre éclairé Avatar de keub51
    Profil pro
    Inscrit en
    Janvier 2007
    Messages
    349
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2007
    Messages : 349
    Par défaut
    Merci ca a résolu mon probleme ... c'est vrai qu'il y avait un bug de 3px avec IE ca m'avait semblé bizarre ... maintenant mon menu fonctionne merci

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Comment faire un lien relatif sur une balise link?
    Par Nixar dans le forum Balisage (X)HTML et validation W3C
    Réponses: 11
    Dernier message: 02/11/2008, 11h11
  2. Cherche lien info... sur l'analyse du code
    Par Alec6 dans le forum Qualimétrie
    Réponses: 3
    Dernier message: 03/03/2004, 14h44
  3. Réponses: 2
    Dernier message: 06/03/2003, 16h37

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo