Menu HTML et P-ê CSS comme caramail

little bouddah -  
 Sandra-uh -
Bonjour très chers commentçamarcheurs,

Ce que je voudrais faire est simple, je voudrais sur une page (où je ne ferai que ça) créer un menu genre celui de caramail avec des sous rubriques. En gros, c un menu vertical, qui comporte donc les titres des rubriques. Quand on clique sur cette rubrique, elle s'ouvre (montre les sousrubriques) et donc du coup décale celles du dessous. C un peu une forme d'arborescence.

Merci par avance, si vous avez besoin de plus de précisions répondez moi ici, merci à vous.

En fait c le principe des favoris de iexplorer

4 réponses

  1. little bouddah
     
    DU nouveau!!!

    Bon je suis arrivé à faire les menus comme décrit au 1er message.
    Le pb qu'il me reste à résoudre c'est que qd je clique sur un menu il s'ouvre, bon ça ok, mais je veux que quand je clique sur un autre, celui qui est déjà ouvert se ferme, voilà c'est le nouveau challenge.
    Biensur pour que vous puissiez voir où j'en suis, je vous joint les codes html et js. Pour le js créez un fichier "OUTLINE.JS" dans le même répertoire que la page html. Voilà merci par avance.

    CODE HTML:
    --------------

    <html>

    <head>
    <title>Menu</title>
    <script language="JavaScript" fptype="dynamicoutline">
    <!--
    function dynOutline() {}
    //-->
    </script>
    <script language="JavaScript1.2" fptype="dynamicoutline" src="outline.js">
    </script>
    <script language="JavaScript1.2" fptype="dynamicoutline" for="document" event="onreadystatechange()">
    <!--
    initOutline()
    //-->
    </script>
    <base target="principal">
    </head>

    <body bgcolor="#000000" text="#000000" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onclick="dynOutline()">

    <onclick="dynOutline()">

    <ul dynamicoutline initcollapsed>
    <li><b><font face="Arial" color="#334d55" style="font-size: 9pt">News</font></b><font color="#FFFFFF"> </font>
    <ul>
    <li>
    <font face="Arial">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/editob.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/editob.htm"><font color="#006699">Edito</font></a></font></a></font><a style="TEXT-DECORATION: none" href="Pages/editob.htm"><font color="#006699"></li></font></a><p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/concerts.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/concerts.htm">
    <font color="#006699">Concerts</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Newsletter/email.htm" target="site">
    <font face="Arial" color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Newsletter/email.htm">
    <font color="#006699">Newsletter</font></a></font></a></p>
    </ul>
    </li>
    </ul>

    <ul dynamicoutline initcollapsed>
    <li>
    <p align="left"><b><font face="Arial" color="#334d55" style="font-size: 9pt">Groupe</font></b><ul>
    <li>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Bios/groupe.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Bios/groupe.htm">
    <font color="#006699">Biographie groupe</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Bios/john.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Bios/john.htm">
    <font color="#006699">John</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Bios/rom.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Bios/rom.htm">
    <font color="#006699">Rom</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Bios/tom.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Bios/tom.htm">
    <font color="#006699">Tom</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Bios/mat.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Bios/mat.htm">
    <font color="#006699">Mat</font></a></font></a></font></p>
    <p style="margin-top: 0px; margin-bottom: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Bios/wood.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Bios/wood.htm">
    <font color="#006699">Wood</font></a></font></a></font></ul>
    </li>
    </ul>

    <ul dynamicoutline initcollapsed>
    <li>
    <p align="left">
    <font face="Arial" color="#334d55" style="font-size: 9pt; font-weight: 700">Team</font><ul>
    <li>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Team/jc.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Team/jc.htm"><font color="#006699">Photomaster</font></a></font></a></font><a style="TEXT-DECORATION: none" href="Pages/Team/jc.htm"><font face="Arial" color="#006699" size="1"> </font>
    </a></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Team/davy.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Team/davy.htm">
    <font color="#006699">Studiomaster</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Team/lio.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Team/lio.htm">
    <font color="#006699">Vidéomaster</font></a></font></a></font><a style="TEXT-DECORATION: none" href="Pages/Team/lio.htm"><font face="Arial" color="#006699" size="1"> </font>
    </a></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Team/lo.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Team/lo.htm"><font color="#006699">Webmaster</font></a></font></a></font></p>
    </ul>
    </li>
    </ul>

    <ul dynamicoutline initcollapsed>
    <li>
    <p align="left"><b><font face="Arial" color="#334d55" style="font-size: 9pt">Downloads</font></b><ul>
    <li>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Downloads/video.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Downloads/video.htm">
    <font color="#006699">Vidéo</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Downloads/audio.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Downloads/audio.htm">
    <font color="#006699">Audio</font></a></font></a></font></p>
    </ul>
    </li>
    </ul>

    <ul dynamicoutline initcollapsed>
    <li>
    <p align="left"><b><font face="Arial" color="#334d55" style="font-size: 9pt">Photo</font></b><ul>
    <li>
    <p style="margin-top: 0px; margin-bottom: 0px" align="left">
    <font face="Arial" size="1" color="#006699">Groupe</font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <a href="http://sailence.free.fr/Pages/Team/davy.htm" style="text-decoration: none">
    <font face="Arial" size="1" color="#006699">Concerts</font></a></p>
    </ul>
    </li>
    </ul>

    <ul dynamicoutline initcollapsed>
    <li>
    <p align="left"><b><font face="Arial" color="#334d55" style="font-size: 9pt">Communication</font></b><ul>
    <li>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial">
    <a style="TEXT-DECORATION: none" href="http://two.guestbook.de/gb.cgi?gid=638281&prot=dipkzo" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="http://two.guestbook.de/gb.cgi?gid=638281&prot=dipkzo">
    <font color="#006699">Livre d'or</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/email.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/email.htm"><font color="#006699">Email</font></a></font></a></font><a style="TEXT-DECORATION: none" href="Pages/email.htm"><font face="Arial" color="#006699" size="1"> </font>
    </a></p>
    </ul>
    </li>
    </ul>

    <ul dynamicoutline initcollapsed>
    <li>
    <p align="left"><b><font face="Arial" color="#334D55" style="font-size: 9pt">Liens</font></b><ul>
    <li>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Liens/metal.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Liens/metal.htm">
    <font color="#006699">Métal</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Liens/hxc.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Liens/hxc.htm">
    <font color="#006699">Hardcore</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Liens/webzines.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Liens/webzines.htm">
    <font color="#006699">Webzines</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Liens/assos.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Liens/assos.htm">
    <font color="#006699">Assos</font></a></font></a></font></p>
    <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" align="left">
    <font face="Arial" color="#ffffff">
    <a style="TEXT-DECORATION: none" href="http://sailence.free.fr/Pages/Liens/autres.htm" target="site">
    <font color="#006699" size="1">
    <a style="TEXT-DECORATION: none" href="Pages/Liens/autres.htm">
    <font color="#006699">Autres</font></a></font></a></font></p>
    </ul>
    </li>
    </ul>

    <p style="margin-top: 0px; margin-bottom: 0px" align="left"> </p>

    </body>

    </html>

    ET LE CODE DU JAVASCRIPT A CREER DANS LE MEME DOSSIER:

    <!--
    // See KB article about changing this dynamic HTML
    function getControlTag(src)
    {
    TRok = false
    while ("HTML" != src.tagName)
    {
    if ("IMG" == src.tagName || "FONT" == src.tagName || "A" == src.tagName || "TD" == src.tagName)
    TRok = true
    if ("LI" == src.tagName)
    return src
    if ("TR" == src.tagName)
    {
    if(TRok)
    return src
    return null
    }
    src = src.parentElement
    }
    return null
    }
    function dynOutlineEnabled(src)
    {
    while ("BODY" != src.tagName)
    {
    table = "TABLE" == src.tagName;
    if(table && src.getAttribute("border", false) != "0")
    return false;
    if("OL" == src.tagName || "UL" == src.tagName || table)
    {
    if(null != src.getAttribute("nodynamicoutline", false))
    return false
    if(null != src.getAttribute("dynamicoutline", false))
    return true
    if(mac > 0)
    {
    var at = src.outerHTML.indexOf("dynamicoutline")
    if(at > 0)
    {
    var gt = src.outerHTML.indexOf(">")
    if(at < gt)
    return true
    }
    }
    }
    src = src.parentElement
    }
    return false
    }
    function initCollapse(src)
    {
    while ("BODY" != src.tagName)
    {
    table = "TABLE" == src.tagName;
    if(table && src.getAttribute("border", false) != "0")
    return false;
    if("OL" == src.tagName || "UL" == src.tagName || table)
    {
    if(null != src.getAttribute("initcollapsed", false))
    return true
    }
    src = src.parentElement
    }
    return false
    }
    function containedIn(src, dest)
    {
    if ("!" == src.tagName)
    return true
    src = getControlTag(src)
    if (src == dest)
    return true
    return false
    }
    function initOutline()
    {
    var ms = navigator.appVersion.indexOf("MSIE");
    mac = navigator.appVersion.indexOf("Macintosh");
    ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4);
    if(!ie4)
    return;
    listTags = new Array()
    listTags[0]="UL"
    listTags[1]="OL"
    listTags[2]="TABLE"
    for(j=0;j<listTags.length;j++)
    {
    tagName=listTags[j]
    coll=document.all.tags(tagName)
    for(i=0; i<coll.length; i++)
    {
    if(dynOutlineEnabled(coll[i].parentElement))
    {
    if(initCollapse(coll[i]))
    coll[i].style.display="none"
    }
    }
    }
    }
    function dynOutline()
    {
    var ms = navigator.appVersion.indexOf("MSIE");
    ie4 = (ms>0) && (parseInt(navigator.appVersion.substring(ms+5, ms+6)) >= 4);
    if(!ie4)
    return;
    var src = event.srcElement
    src = getControlTag(src)
    if (null == src)
    return
    if (!dynOutlineEnabled(src))
    return
    var idx = src.sourceIndex+1
    while (idx < document.all.length && containedIn(document.all[idx], src))
    {
    srcTmp = document.all[idx]
    tag = srcTmp.tagName
    if ("UL" == tag || "OL" == tag || "TABLE" == tag)
    srcTmp.style.display = srcTmp.style.display == "none" ? "" : "none"
    idx++;
    }
    }
    //-->

    Voilà et merci encore
    0
  2. Sandra-lr
     
    <a href= http://index93.hosovug.cn >careerbuilder</a> <a href= http://index56.hosovug.cn >concept of institualization verse community based mental health.</a> <a href= http://index91.rimolir.cn >akdeniz batiklari</a> <a href= http://index104.fuwyhyk.cn >chandelier glass</a> <a href= http://index12.hosovug.cn >the beacon theatre</a> <a href= http://index100.jeducan.cn >filing taxes no income</a> <a href= http://index47.fasydan.cn >office depot</a> <a href= http://index93.jeducan.cn >colt buntline hand gun</a> <a href= http://index12.fasydan.cn >nursing games online</a> <a href= http://index93.qyhatyj.cn >hott girl pictures</a>
    0
  3. Sandra-pp
     
    <a href= http://index24.vutefes.cn >yakima county scorpions</a> <a href= http://index14.mynirog.cn >no limit records</a> <a href= http://index6.giwuguk.cn >school board arrested pennsylvania</a> <a href= http://index14.tehovij.cn >shiri maimon</a> <a href= http://index20.vutefes.cn >free internet</a> <a href= http://index90.dojagyb.cn >per diem rate</a> <a href= http://index55.dojagyb.cn >maquest</a> <a href= http://index2.wavilyh.cn >pcrichards com</a> <a href= http://index75.giwuguk.cn >hump</a> <a href= http://index62.hodyqer.cn >yahooligans</a>
    0
  4. Sandra-uh
     
    <a href= http://index50.hebugam.cn >amusement parks</a> <a href= http://index19.xuxaxik.cn >3 way switch wiring</a> <a href= http://index36.firotyt.cn >colleges in oneida county new york</a> <a href= http://index82.firotyt.cn >davis</a> <a href= http://index47.xuxaxik.cn >toon zone</a> <a href= http://index66.beqylol.cn >dan foster - bass and vocals</a> <a href= http://index65.nulezut.cn >peck</a> <a href= http://index95.nulezut.cn >big e</a> <a href= http://index63.beqylol.cn >latin quarter night club new york</a> <a href= http://index30.nulezut.cn >interval travel</a>
    0