Probléme avec ma page d'accueil

alaindu_33 Messages postés 25 Date d'inscription dimanche 22 mars 2009 Statut Membre Dernière intervention 20 août 2009 - 2 mai 2009 à 09:38
alaindu_33 Messages postés 25 Date d'inscription dimanche 22 mars 2009 Statut Membre Dernière intervention 20 août 2009 - 2 mai 2009 à 12:20
Bonjour voila j'ai un probleme j'ai trouvé sur le site un super présentation de menu et sous menu et je remercie l'auteur mais voila mon souci c'est que le menu et sous  prend toute la page d'accueil et impossible d'incerer autre chose comme une photo ou autre voila le code
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Accueil</title>
</head>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
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';}
}
//-->
</script>

<style type="text/css" media="screen">
<!--
body {
margin: 0;
padding: 0;
background: white;
font: 80% verdana, arial, sans-serif;
}
dl, dt, dd, ul, li {
margin: 0;
padding: 0;
list-style-type: none;
}
#menu {
position: absolute; /* placement du menu, à modifier selon vos besoins */
top: 0;
left: 0;
z-index:100;
width: 100%; /* correction pour Opera */
}
#menu dl {
float: left;
width: 12em;
}
#menu dt {
cursor: pointer;
text-align: center;
font-weight: bold;
background: #ccc;
border: 1px solid gray;
margin: 1px;
}
#menu dd {
display: none;
border: 1px solid gray;
}
#menu li {
text-align: center;
background: #fff;
}
#menu li a, #menu dt a {
color: #000;
text-decoration: none;
display: block;
height: 100%;
border: 0 none;
}
#menu li a:hover, #menu li a:focus, #menu dt a:hover, #menu dt a:focus {
background: #eee;
}
#site {
position: absolute;
z-index: 1;
top : 70px;
left : 10px;
color: #000;
background-color: #ddd;
padding: 5px;
border: 1px solid gray;
}
-->
</style>

</head>

* :
Accueil

* grs :

<li>Sous-Menu 1.1</li>
<li>Sous-Menu 1.2</li>
<li>Sous-Menu 1.3</li>
<li>Sous-Menu 1.4</li>
<li>Sous-Menu 1.5</li>
<li>Sous-Menu 1.6</li>

* Menu 2 :

<li>Sous-Menu 2.1</li>
<li>Sous-Menu 2.2</li>
<li>Sous-Menu 2.3</li>
<li>Sous-Menu 2.4</li>

* Menu 3 :

<li>Sous-Menu 3.1</li>
<li>Sous-Menu 3.2</li>
<li>Sous-Menu 3.3</li>
<li>Sous-Menu 3.4</li>
<li>Sous-Menu 3.5</li>

* Menu 4 :

<li>Sous-Menu 4.1</li>
<li>Sous-Menu 4.2</li>
<li>Sous-Menu 4.3</li>

</html>

</html>
merci d'avance de vos réponses

5 réponses

kohntark Messages postés 3705 Date d'inscription lundi 5 juillet 2004 Statut Membre Dernière intervention 27 avril 2012 30
2 mai 2009 à 10:21
Salut,

De quel script s'agit il ? As tu contacté l'auteur pour exposer ton pb ?
Je ne le saisi pas trop ce problème d'ailleurs, je viens de faire un test rapide et ça fonctionne.

Par contre :

</html>

</html>
=> les balises en bleu sont en doublon

Il y a des tags non fermés (<div)

Cordialement,

Kohntark -
0
alaindu_33 Messages postés 25 Date d'inscription dimanche 22 mars 2009 Statut Membre Dernière intervention 20 août 2009
2 mai 2009 à 11:07
bonjour kohntark De quel script s'agit il ?
l'auteur je ne sais plus
Il y a des tags non fermés (<div) ?
et pour finir j'utilise frontpage ou j'ajoute le code
je suis vraiment un debutant un peut perdu
merci de me venir en aide
0
kohntark Messages postés 3705 Date d'inscription lundi 5 juillet 2004 Statut Membre Dernière intervention 27 avril 2012 30
2 mai 2009 à 12:00
Le div
n'a pas de tag de fermeture (cad
)

J'ai regardé très rapidement (et donc je peux dire une bétise qui ne sera ni la première ni la dernière)
Tu devrais mettre le code du menu dans un fichier, par ex : menu.php
Ensuite dans chacune de tes pages (qui correspondent aux menus / sous menus) tu l'inclus :
include('menu.php');
Il te faut renseigner les href :
<li>[# Sous-Menu 4.1]</li>
=>
<li>[mon_sous_menu_4_1.php Sous-Menu 4.1]</li>

Je me trompes peut être mais si tu es "grand" débutant (je me base sur "un débutant un peu perdu" et l'interrogation sur "tag non fermé") tu ne devrais sans doute pas commencer par un tel menu, non pas qu'il soit complexe, mais il demande un minimum de connaissances javascript et HTML.
Je t'encourage vivement à lire les milliers de tutos disponibles sur le web et à abandonner frontpage au profit d'un éditeur de texte avancé (style PSpad) qui t'obigera à écrire directement le code de la page.
C'est certes un peu plus complexe, mais c'est la seule manière qui te permettra de mettre en oeuvre les codes sources que tu peux trouver un peu partout de façon éfficace.

Cordialement,

Kohntark -
0
alaindu_33 Messages postés 25 Date d'inscription dimanche 22 mars 2009 Statut Membre Dernière intervention 20 août 2009
2 mai 2009 à 12:07
voila ce que la donne mais les sous menu on disparu

<html>

<head>
<meta http-equiv= "Content-Type" content="text/html; charset=windows-1252">
<title>Nouvelle page 1</title>
<script language="JavaScript">
<!--
function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n
</script>
</head>

&nbsp;

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Accueil</title>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
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';}
}
//-->
</script>

<style type="text/css" media="screen">
<!--
body {
margin: 0;
padding: 0;
background: white;
font: 80% verdana, arial, sans-serif;
}
li {
margin: 0;
padding: 0;
list-style-type: none;
}
ul {
margin: 0;
padding: 0;
list-style-type: none;
}
dd {
margin: 0;
padding: 0;
list-style-type: none;
}
dt {
margin: 0;
padding: 0;
list-style-type: none;
}
dl {
margin: 0;
padding: 0;
list-style-type: none;
}
#content {margin-top:20px; padding:15px; border:solid 1px #000; width:100%}
#menu {
position: absolute; /* placement du menu, à modifier selon vos besoins */
top: 0;
left: 0;
z-index:100;
width: 100%; /* correction pour Opera */
height:20px;
}
#menu dl {
float: left;
width: 12em;
}
#menu dt {
cursor: pointer;
text-align: center;
font-weight: bold;
background: #ccc;
border: 1px solid gray;
margin: 1px;
}
#menu dd {
display: none;
border: 1px solid gray;
}
#menu li {
text-align: center;
background: #fff;
}
#menu dt a {
color: #000;
text-decoration: none;
display: block;
height: 100%;
border: 0 none;
}
#menu li a {
color: #000;
text-decoration: none;
display: block;
height: 100%;
border: 0 none;
}
#menu dt a:focus {
background: #eee;
}
#menu dt a:hover {
background: #eee;
}
#menu li a:focus {
background: #eee;
}
#menu li a:hover {
background: #eee;
}
#site {
position: absolute;
z-index: 1;
top : 70px;
left : 10px;
color: #000;
background-color: #ddd;
padding: 5px;
border: 1px solid gray;
}
-->
</style>

            *         :
        Accueil
   

            *         :
        grs
       
       
            <li style =\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            </li>
            <li style= \"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 1.2</li>
            <li style=\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 1.3</li>
            <li style=\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 1.4</li>
            <li style=\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 1.5</li>
            <li style=\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 1.6</li>
       
       
   

            *         Menu 2
        :
       
            <li style =\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 2.1</li>
            <li style= \"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 2.2</li>
            <li style=\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 2.3</li>
            <li style=\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 2.4</li>
       
       
   

            *         Menu 3
        :
       
            <li style =\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 3.1</li>
            <li style= \"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 3.2</li>
            <li style=\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 3.3</li>
            <li style=\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 3.4</li>
            <li style=\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 3.5</li>
       
       
   

            *         Menu 4
        :
       
            <li style =\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 4.1</li>
            <li style=\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 4.2</li>
            <li style=\"text-align: center; list-style-type: none; margin: 0; padding: 0; background: #fff\">
           
            Sous-Menu 4.3</li>
       
       
   

&nbsp;&nbsp;

merci pour ton aide
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
alaindu_33 Messages postés 25 Date d'inscription dimanche 22 mars 2009 Statut Membre Dernière intervention 20 août 2009
2 mai 2009 à 12:20
voila ce que j'avais deja crée avec frontpage
mon site http://pagesperso-orange.fr/grs.st.caprais/
0
Rejoignez-nous