Accueil > Forum > > > > Il y a des erreurs dans mon code, aidez-moi SVP
Il y a des erreurs dans mon code, aidez-moi SVP
jeudi 13 mars 2008 à 10:31:54 |
Il y a des erreurs dans mon code, aidez-moi SVP

chabgyver
|
Bonjour, Suite à de nombreux commentaires de visiteurs de mon site, j'ai été contraints de refaire le menu dans un soucis de clarté. Ca marche pas trop mal mais voilà, je suis confronté à un problème lié aux marges qui sont jamais pareilles. J'ai essayé mon site sur Safari, IE 7, Firefox 2 (win et mac) et j'obtiens 4 résultats différents. Les résultats les plus laids sont sur Firefox. Voici l'url de mon site : http://balistiq.free.fr/index2.htm Voici le code de la page index2.htm : <html> <head> <title>RADIO BALISTIQ</title> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <style type="text/css"> </style> <script type="text/javascript"> //-------------------------------------- // Changement de la SRC d'une IFRAME... //-------------------------------------- function Charge_Fichier( where_, url_){ window.frames[where_].location.href=url_ }
window.onload=montre; function montre(id) { var d = document.getElementById(id); for (var i = 1; i<=10; i++) { if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';} } if (d) {d.style.display='block';} }
<!-- function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable) { toolbar_str = toolbar ? 'yes' : 'no'; menubar_str = menubar ? 'yes' : 'no'; statusbar_str = statusbar ? 'yes' : 'no'; scrollbar_str = scrollbar ? 'yes' : 'no'; resizable_str = resizable ? 'yes' : 'no';
cookie_str = document.cookie; cookie_str.toString();
pos_start = cookie_str.indexOf(name); pos_end = cookie_str.indexOf('=', pos_start);
cookie_name = cookie_str.substring(pos_start, pos_end);
pos_start = cookie_str.indexOf(name); pos_start = cookie_str.indexOf('=', pos_start); pos_end = cookie_str.indexOf(';', pos_start);
if (pos_end <= 0) pos_end = cookie_str.length; cookie_val = cookie_str.substring(pos_start + 1, pos_end); if (cookie_name == name && cookie_val == "done") return;
window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str); } </script> <link href="http://balistiq.free.fr/pngfix/fixIE.css" rel="stylesheet" type="text/css"> </head>
<body background="http://balistiq.free.fr/fond.jpg"> <a id="site"></a>
<center> <table background="http://balistiq.free.fr/fond-index2.gif" width=950 height=600 border=0 cellspacing=0 cellpadding=0> <dl id="menu">
<tr> <td rowspan="3" width="177" valign="top"> <div id="MENU" style="overflow: hidden;width:177px;height:15px;"> <img src="fond-index2.gif" usemap="#Map" border="0"> </div> <div id="Layer1" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre();"><a href="http://balistiq.free.fr/contenu.php" target="la_frame"><img height=22 src="http://balistiq.free.fr/boutons/accueil.gif" width=66 border=0></a></dt> </div> <div id="Layer2" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre('smenu2');"><img height=27 src="http://balistiq.free.fr/boutons/presentation.gif" width=121 border=0></a></dt> <dd style="display: none;" id="smenu2"> <a href="http://balistiq.free.fr/rubriques/balistiq.html" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/balistiq.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/rubriques/yes-we-can-can.html" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/yeswecancan.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/rubriques/equipe.html" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/equipe.png" width=120 border=0 align="left"><br> </a> </dd> </div> <div id="Layer3" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre();"><a href="http://balistiq.free.fr/rubriques/radio.html" target="la_frame"><img height=22 src="http://balistiq.free.fr/boutons/radio.gif" width=74 border=0></a></dt> </div> <div id="Layer4" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre();"><a href="http://balistiq.free.fr/rubriques/programme.html" target="la_frame"><img height=23 src="http://balistiq.free.fr/boutons/programme.gif" width=95 border=0></a></dt> </div> <div id="Layer5" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre('smenu3');"><img height=21 src="http://balistiq.free.fr/boutons/culture.gif" width=65 border=0></a></dt> <dd style="display: none;" id="smenu3"> <a href="http://balistiq.free.fr/rubriques/apollo.html" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/apollo.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/rubriques/festivals.html" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/festivals.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/rubriques/concerts.html" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/concerts.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/rubriques/scenes-locales.html" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/sceneslocales.png" width=120 border=0 align="left"><br> </a> </dd> </div> <div id="Layer6" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre();"><a href="http://balistiq.free.fr/rubriques/presse.htm" target="la_frame"><img height=22 src="http://balistiq.free.fr/boutons/presse.gif" width=58 border=0></a></dt> </div> <div id="Layer7" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre('smenu4');"><img height=23 src="http://balistiq.free.fr/boutons/emissions.gif" width=80 border=0></a><br> </dt> <dd style="display: none;" id="smenu4"> <a href="http://balistiq.free.fr/rubriques/fiche-concept.htm" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/ficheconcept.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/php/articles/article.php?categorie=3&article=6" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/emissions.png" width=120 border=0 align="left"><br> </a> </dd> </div> <div id="Layer8" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre('smenu5');"><img height=22 src="http://balistiq.free.fr/boutons/communaute.gif" width=100 border=0></a></dt> <dd style="display: none;" id="smenu5"> <a href="mailto:balistiq@free.fr"><img height=15 src="http://balistiq.free.fr/menu/boutons/contact.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/php/livredor/" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/livredor.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/php/newsletter/subscribe.php" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/newsletter.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/php/forum/"><img height=15 src="http://balistiq.free.fr/menu/boutons/forum.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/rubriques/myspaces.htm" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/myspaces.png" width=120 border=0 align="left"><br> </a> </dd> </div> <div id="Layer9" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre();"><a href="http://balistiq.free.fr/rubriques/partenaires.html" target="la_frame"><img height=21 src="http://balistiq.free.fr/boutons/partenaires.gif" width=98 border=0></a></dt> </div> <div id="Layer10" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre('smenu6');"><img height=22 src="http://balistiq.free.fr/boutons/goodies.gif" width=62 border=0></a></dt> <dd style="display: none;" id="smenu6"> <a href="http://balistiq.free.fr/php/articles/article.php?categorie=1&article=1" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/fondsecrans.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/php/articles/article.php?categorie=1&article=2" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/jeux.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/rubriques/galerie.html" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/photos.png" width=120 border=0 align="left"><br> </a> </dd> </div> <div id="Layer11" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre('smenu7');"><img src="http://balistiq.free.fr/boutons/menu/ecouter.gif" border="0" height="29" width="70"></dt> <dd style="display: none;" id="smenu7"> <a href="javascript:na_open_window('win', 'http://balistiq.free.fr/php/live/', 0, 0, 340, 580, 0, 0, 0, 0, 0)"><img height=15 src="http://balistiq.free.fr/menu/boutons/playlist.png" width=120 border=0 align="left"><br> </a> <a href="http://balistiq.free.fr/rubriques/direct-fm.html" target="la_frame"><img height=15 src="http://balistiq.free.fr/menu/boutons/radiofm.png" width=120 border=0 align="left"><br> </a> <a href="javascript:na_open_window('win', 'http://balistiq.free.fr/php/Mix-DJ/', 0, 0, 340, 580, 0, 0, 0, 0, 0)"><img height=15 src="http://balistiq.free.fr/menu/boutons/mixdj.png" width=120 border=0 align="left"><br> </a> <a href="javascript:na_open_window('win', 'http://balistiq.free.fr/php/interviews/', 0, 0, 340, 580, 0, 0, 0, 0, 0)"><img height=15 src="http://balistiq.free.fr/menu/boutons/interviews.png" width=120 border=0 align="left"><br> </a> </dd> </div> <div id="Layer12" style="text-align:left;position:relative;left:30px; top: 0px;"> <dt onmouseover="javascript:montre();"><a href="http://balistiq.free.fr/rubriques/videos.html" target="la_frame"><img src="http://balistiq.free.fr/boutons/menu/voir.gif" border="0" height="22" width="52"></a></dt> </div> </dl>
</td> <td height=75> <div align="right"><img src="anim.gif" width="82" height="52"></div></td> <td>
</td> </tr> <tr> <td width=723 height="482" valign=top> <div id="D_FRAME" style="width:723px;height:482px;overflow:hidden;margin:0px"> <iframe src="http://balistiq.free.fr/contenu.php" frameborder="0" style="top:0px;left:0px;width:740px;height:498px;" id="la_frame" name="la_frame" scrolling="yes"> </iframe> </div> </td> </tr> <tr> <td> <td> </td> </tr> </table> </center> </body> </html>Et le code de mon fichier iframe.css : html,body { background-color : #000000; background-repeat:no-repeat; background-image:url(http://balistiq.free.fr/contenu.jpg); background-position: 0px 0px; background-attachment:fixed; font-family : Arial, Helvetica, Geneva, sans-serif,Verdana; color : white; }
A:link { COLOR: #bbbbbb; } A:visited{ color: #cccccc; } A:hover { color: #aaaaaa; }
dl, dt, dd, ul, li { margin: 0; padding: 0; list-style-type: none; } #menu { position: absolute; top: 0; left: 0; } dl#menu {
} dl#menu dt { cursor: pointer; margin: 0; height: 25px; line-height: 20px; text-align: left; font-weight: bold; border: 0px; background: #; } dl#menu dd { border: 0px; } dl#menu li { text-align: left; background: #fff; } dl#menu li a, dl#menu dt a { color: #000; text-decoration: none; display: block; border: 0 none; height: 100%; }
dl#menu li a:hover, dl#menu dt a:hover { background: #; }
#mentions { font-family: verdana, arial, sans-serif; position: absolute; bottom : 200px; left : 10px; color: #000; } #mentions a {text-decoration: none; color: #; } #mentions a:hover{text-decoration: underline; }Merci d'avance pour votre aide.
|
|
jeudi 13 mars 2008 à 14:29:27 |
Re : Il y a des erreurs dans mon code, aidez-moi SVP

XtremDuke
|
Oula... Je crois que tu te compliques la vie. Tu n'utiliserais pas un éditeur WYSIWYG ? Tes menus sont a base de DIV les unes en dessous des autres. Je ne vois pas pourquoi tu spécifies une position quelconque. Si tu veux décaller les menus par rapport à la bordure de gauche (apparement de 30px), spécifies simplement un 'margin-left:30px;'.
Si j'ai un conseille à te donner, utilises plutôt un système de listes non ordonnées (<ul><li>...) pour créer ce genre de menu.
Inspires toi de http://www.oreilly.fr/contenu/2007/05/22/un-menu-dynamique-sans-javascript (par exemple).
|
|
vendredi 14 mars 2008 à 10:50:17 |
Re : Il y a des erreurs dans mon code, aidez-moi SVP

chabgyver
|
J'ai essayé de tout supprimer dans le css à partir de :
dl, dt, dd, ul, li { margin: 0; padding: 0; list-style-type: none;
et ce jusqu'en bas
Donc, le problème ne vient pas du css qui me parait bien inutile. Le CSS est appelé à partir du fichier contenu.php, donc pas la peine de chercher dans le code ci-dessus où il en est question. J'ai essayé de mettre des balises <ul> mais ça accentue le problème, je comprends pas d'où ça vient ces histoire de marge, pourquoi les sous menus sont décalés par rapport aux boutons parents ?
|
|
vendredi 14 mars 2008 à 12:52:07 |
Re : Il y a des erreurs dans mon code, aidez-moi SVP

XtremDuke
|
Essaie de remplacer tes block menu :
Exemple :
<div id="Layer9" style="text-align:left;position:relative;left:30px; top: 0px;">
pour
<div id="Layer9" style="text-align:left;margin-left:30px;">
|
|
vendredi 14 mars 2008 à 13:55:11 |
Re : Il y a des erreurs dans mon code, aidez-moi SVP

chabgyver
|
J'ai essayé mais c'est encore pire, les décalages sont encore plus énormes. Logiquement les boutons et les sous-menus devraient être aligné, or, ce n'est pas le cas comme s'il y avait une valeur quelque part qui réglementait ceci. J'ai cherché partout, je trouve pas.
|
|
Cette discussion est classée dans : menu, str, cookie, dl, pos
Répondre à ce message
Sujets en rapport avec ce message
Menu Cookie Sous IPB [ par Divinity78180 ]
Hello,J'ai récement travaillé sur un script qui permet d'afficher ou de cacher un menu avec l'enregistrement des options dans un cookie ( <a href=
plusieurs code sur la meme page [ par mc74gyver ]
sltje voudrait savoir comment on fait pour mettre deux codes javascript sur la meme pagevoila un bout de code merci de votre aide ca c'est le menu va
Date en français [ par dragzor ]
Bonsoir,J'ai emprunté un petit script quelque part pour indiquer à quand remontait la dernière visite de l'utilisateur sur mon site mais malheureuseme
Probleme underline sous mozilla [ par ManuM ]
Bonjour, j'ai créé un menu avec un fond pour chaque bouton, le texte est souligné lors du passage de la souris.Sous IE, cela fonctionne correctement,
supprimer 2 frames sur 3 [ par niamor23 ]
Salut, j'ai fait un site avec 3 frames, une en haut, une à gauche pour un menu puis une centrale qui affiche les differentes pages. Je voudrais pouvoi
menu déroulant et affichage dans la même page [ par cybermalicia ]
Slt @ tous et déjà merci d'avance ^^.Pr info jsui une petite débutante sur le plan utilisation des menus sans l'utilisation des frames alors je suis e
Menu coulissant, Firefox [ par sbol ]
Bonjour,Pour gagner de l'espace, j'ai construit un menu totalement caché, à gauche de l'écran qui s'ouvre "onMouse" en javascript. Pas de pb avec IE,
Menu contextuel en flash [ par sbeex ]
Bonjour !Je cherche à mettre un menu contextuel en flash pour mon siteweb j'ai vu ça il y a quelque mois sur un site.(ps : mon site est en php et non
Faire disparaitre des sous-menus après ouverture (menu dyna) [ par PyRoXtY ]
Bonjour,J'ai trouvé un menu dynamique vertical qui était fort interressent il y a environs une semaine sur internet. Je l'ai testé et je l'ai trouvé g
Information au survol des liens d'un menu [ par rouliendelavegas ]
bonjour,je suis en train de faire un site et je suis face à un petit problemeje voudrais qu'au survol des liens de mon menu, une description du lien s
Livres en rapport
|
Derniers Blogs
JOYEUX ANNIVERSAIRE NIXJOYEUX ANNIVERSAIRE NIX par ebartsoft
Souhaitons un bon et joyeux anniversaire à notre hôte à tous, Nix.
Je ne le répéterais jamais assez mais sans lui rien ne serait possible. Il défit en permanence les lois de la gravité et comme il le dit si bien, si tu lui fais confiance ça devra...
Cliquez pour lire la suite de l'article par ebartsoft IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc
Forum
UTILISER UN .JSUTILISER UN .JS par zaikoe
Cliquez pour lire la suite par zaikoe
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|