Menu Desplegable no funciona

Primero los felicito por tan instructiva página, es exelente.
Adjunto el html y css. No me funciona:
1 - Color fondo de la pagina
2 - El menu desplegable

Gracias por su asistencia

plantilla.html esta así:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Page title</title>
<link rel="stylesheet" href="estilo-general.css" type="text/css" media="all">
<link rel="stylesheet" href="estilo-menu-desplegable.css" type="text/css" media="all">
<script language="JavaScript" src="no-tocar.txt" type="text/javascript"></script>
<sctipt language="JavaScript" src="numero-de-menus.txt" type="text/javascript"></script>
</head>
<body>
<div id="global">
<div id="curva-superior"></div>
<div id="cabecera">
<div id="logotipo">[contenido no disponible]</div>
<div id="publicidad">Bienvenidos a mi Web</div>
</div>
<div id="navegacion">
<ul>
  • Sección 1
  • Sección 2
  • Sección 3

    </div>
    <div id="contenido">
    <div id="menu">
    <h1>Titulo de Sección 1</h1>
    <ul>
  • Enlace 1
  • Enlace 2
  • Enlace 3
  • Enlace 4
    </div>
    <h1>Esta será la zona principal de la web</h1>


    Este es mi segundo párrafo. Acabo de poner un punto y en cambio sigue siendo un párrafo pues no le he colocado aún la etiqueta de cierre. Voy a ponersela justo aquí.</p>
    <h2>Y este es el tercer párrafo.</h2>


    En pocas lecciones aprenderé a darle margenes para separarlos unos de otros, e incluso hacerles sangrías por la izquierda a la primera línea, que queda mucho mejor.</p>


    Anda, fijate! Salen todos centrados, que cosa. Espero que Jorgens nos enseñe a ponerlos alineados a la izquierda, o justificados. Así esto parece una poesia! je je je.</p>
    </div>
    <div id="pie">
    <div id="pieuno">
    <ul>
  • Foro Ejemplo
  • Contactos
  • Nos Enlazan

    </div>
    <div id="piedos">Pie Dos</div>
    <div id="pietres">
    <ul>
  • Directorio
  • Top Site
  • Mapa de la Web

    </div>
    </div>
    <div id="curva-inferior"></div>
    </div>
    <script language="JavaScript" src="definir-menus.txt" type="text/javascript"></script>
    </body>
    </html>



    estilos-general.css esta así:

    * {text-indent:0px ; margin:0px ; padding:0px ; border: 0px}
    p {text-align: justify}
    h1 {font-size: 1.2em; color:blue ; font-weight: bold ; text-decoration: underline ; text-align: center}
    h2 {font-size: 1.1em; color:blue ; font-weight: bold ; text-decoration: none ; text-align: center}
    body {text-align: center}
    #global {width:800px ; margin:4px auto }

    #curva-superior { background-image: url(objetos/curva-superior.gif) ;
    background-repeat: no-repeat ;
    width:800px ;
    height:12px ;
    overflow : hidden}
    #cabecera {background-color: white ; border-left: black 1px solid ;
    border-right: black 1px solid ; height:85px}
    #logotipo {width:280px ; float:left }
    #publicidad {width:518px ; float:right ; margin-top:25px ; font-size: 16px}
    #navegacion {background-color: gray ; border: black 1px solid ; height:20px}
    #navegacion li {float:left ; list-style:none ; margin: 0px 20px 0px 20px }
    #navegacion ul { margin-left: 180px }
    #contenido {background-color: orange ; border-left: black 1px solid ; border-right: black 1px solid}
    #contenido p {margin: 5px 10px 5px 10px ; text-indent: 15px}
    #menu {background-color: yellow; width: 150px ; float:left ; text-align:left ; margin:3px 10px 3px 3px ;
    background-image: url(objetos/menu-parte-inferior.gif) ; background-position: bottom ; padding-bottom:5px}
    #menu li { list-style:none ; margin: 4px 8px 4px 6px}
    #menu h1 {text-decoration:none ; font-size:12px ; padding-top:12px ;
    background-image: url(objetos/menu-parte-superior.gif) }
    #pie { background-color: white ;
    border-left: black 1px solid ;
    border-right: black 1px solid;
    border-top: black 1px solid ;
    height: 65px}
    #pie li {list-style : none ; font-size 12px}
    #pieuno {background-color: white ; float:left ; width:150px ; border-right: black 1px solid}
    #piedos {background-color: white ; float:left ; width:498px}
    #pietres{background-color: white ; float:left ; width:150px ; border-left: black 1px solid}
    #curva-inferior { background-image: url(objetos/curva-inferior.gif) ;
    background-repeat: no-repeat ;
    width:800px ;
    height: 12px
    overflow: hidden }
    a {color: brown ; text-decoration:none ; display:block }
    a:link {}
    a:visited {}
    a:hover {color:red ; text-decoration:underline ; background-color: silver}
    a:active {}
    #pie a {color:blue ; text-decoration:none ; display:block }
    #pie a:link{}
    #pie a:visited{}
    #pie a:hover {color:black ; text-decoration:underline ; background-color:white}
    #pie a:active {color-black}
    #logotipo a {}
    #logotipo a:link {}
    #logotipo a:visited{}
    #logotipo a:hover {background-color: white}
    #logotipo a:active {}

    Nuevamente muchas gracias
  • No te sale el fonfo en la plantilla.htlm porque no tienes definido nada para que salga... tu en la hoja de estilos (estilos-general.css) tienes así:



    * {text-indent:0px ; margin:0px ; padding:0px ; border: 0px}
    p {text-align: justify}
    h1 {font-size: 1.2em; color:blue ; font-weight: bold ; text-decoration: underline ; text-align: center}
    h2 {font-size: 1.1em; color:blue ; font-weight: bold ; text-decoration: none ; text-align: center}
    body {text-align: center}
    #global {width:800px ; margin:4px auto }

    #curva-superior { background-image: url(objetos/curva-superior.gif) ;
    background-repeat: no-repeat ;
    width:800px ;
    height:12px ;
    overflow : hidden}
    #cabecera {background-color: white ; border-left: black 1px solid ;
    border-right: black 1px solid ; height:85px}
    #logotipo {width:280px ; float:left }
    #publicidad {width:518px ; float:right ; margin-top:25px ; font-size: 16px}
    #navegacion {background-color: gray ; border: black 1px solid ; height:20px}
    #navegacion li {float:left ; list-style:none ; margin: 0px 20px 0px 20px }
    #navegacion ul { margin-left: 180px }
    #contenido {background-color: orange ; border-left: black 1px solid ; border-right: black 1px solid}
    #contenido p {margin: 5px 10px 5px 10px ; text-indent: 15px}
    #menu {background-color: yellow; width: 150px ; float:left ; text-align:left ; margin:3px 10px 3px 3px ;
    background-image: url(objetos/menu-parte-inferior.gif) ; background-position: bottom ; padding-bottom:5px}
    #menu li { list-style:none ; margin: 4px 8px 4px 6px}
    #menu h1 {text-decoration:none ; font-size:12px ; padding-top:12px ;
    background-image: url(objetos/menu-parte-superior.gif) }
    #pie { background-color: white ;
    border-left: black 1px solid ;
    border-right: black 1px solid;
    border-top: black 1px solid ;
    height: 65px}
    #pie li {list-style : none ; font-size 12px}
    #pieuno {background-color: white ; float:left ; width:150px ; border-right: black 1px solid}
    #piedos {background-color: white ; float:left ; width:498px}
    #pietres{background-color: white ; float:left ; width:150px ; border-left: black 1px solid}
    #curva-inferior { background-image: url(objetos/curva-inferior.gif) ;
    background-repeat: no-repeat ;
    width:800px ;
    height: 12px
    overflow: hidden }
    a {color: brown ; text-decoration:none ; display:block }
    a:link {}
    a:visited {}
    a:hover {color:red ; text-decoration:underline ; background-color: silver}
    a:active {}
    #pie a {color:blue ; text-decoration:none ; display:block }
    #pie a:link{}
    #pie a:visited{}
    #pie a:hover {color:black ; text-decoration:underline ; background-color:white}
    #pie a:active {color-black}
    #logotipo a {}
    #logotipo a:link {}
    #logotipo a:visited{}
    #logotipo a:hover {background-color: white}
    #logotipo a:active {}

    y debes tener así:



    * {text-indent:0px ; margin:0px ; padding:0px ; border: 0px}
    p {text-align: justify}
    h1 {font-size: 1.2em; color:blue ; font-weight: bold ; text-decoration: underline ; text-align: center}
    h2 {font-size: 1.1em; color:blue ; font-weight: bold ; text-decoration: none ; text-align: center}
    body {background-image: url(objetos/fondo26.jpg); background-position: center ; background-repeat: y ; height:100%; text-align: center}
    #global {width:800px ; margin:4px auto }

    #curva-superior { background-image: url(objetos/curva-superior.gif) ;
    background-repeat: no-repeat ;
    width:800px ;
    height:12px ;
    overflow : hidden}
    #cabecera {background-color: white ; border-left: black 1px solid ;
    border-right: black 1px solid ; height:85px}
    #logotipo {width:280px ; float:left }
    #publicidad {width:518px ; float:right ; margin-top:25px ; font-size: 16px}
    #navegacion {background-color: gray ; border: black 1px solid ; height:20px}
    #navegacion li {float:left ; list-style:none ; margin: 0px 20px 0px 20px }
    #navegacion ul { margin-left: 180px }
    #contenido {background-color: orange ; border-left: black 1px solid ; border-right: black 1px solid}
    #contenido p {margin: 5px 10px 5px 10px ; text-indent: 15px}
    #menu {background-color: yellow; width: 150px ; float:left ; text-align:left ; margin:3px 10px 3px 3px ;
    background-image: url(objetos/menu-parte-inferior.gif) ; background-position: bottom ; padding-bottom:5px}
    #menu li { list-style:none ; margin: 4px 8px 4px 6px}
    #menu h1 {text-decoration:none ; font-size:12px ; padding-top:12px ;
    background-image: url(objetos/menu-parte-superior.gif) }
    #pie { background-color: white ;
    border-left: black 1px solid ;
    border-right: black 1px solid;
    border-top: black 1px solid ;
    height: 65px}
    #pie li {list-style : none ; font-size 12px}
    #pieuno {background-color: white ; float:left ; width:150px ; border-right: black 1px solid}
    #piedos {background-color: white ; float:left ; width:498px}
    #pietres{background-color: white ; float:left ; width:150px ; border-left: black 1px solid}
    #curva-inferior { background-image: url(objetos/curva-inferior.gif) ;
    background-repeat: no-repeat ;
    width:800px ;
    height: 12px
    overflow: hidden }
    a {color: brown ; text-decoration:none ; display:block }
    a:link {}
    a:visited {}
    a:hover {color:red ; text-decoration:underline ; background-color: silver}
    a:active {}
    #pie a {color:blue ; text-decoration:none ; display:block }
    #pie a:link{}
    #pie a:visited{}
    #pie a:hover {color:black ; text-decoration:underline ; background-color:white}
    #pie a:active {color-black}
    #logotipo a {}
    #logotipo a:link {}
    #logotipo a:visited{}
    #logotipo a:hover {background-color: white}
    #logotipo a:active {}

    En verde la linea que debes cambiar y en rojo como debe quedar. cambia el nombre de la imagen por la correcta y su extensión.

    background-image: url(objetos/fondo26.jpg); background-position: center ; background-repeat: y ; height:100%; text-align: center
    Para el menú tenemos que ver que hay dentro de definir-menus y numero-de menus .un saludo
    definir-menus.txt

    if (TransMenu.isSupported())
    {
    var ms=new TransMenuSet(TransMenu.direction.down,1,0, TransMenu.reference.bottomLeft);

    var desplegable1 = ms.addMenu(document.getElementById('desplegable1'));
    desplegable1.addItem('Seccion 1','ruta');
    desplegable1.addItem('Seccion 2','ruta');
    var desplegable2_0 = desplegable1.addMenu(desplegable1.items[1]);
    desplegable2_0.addItem('Sub-Seccion 2.1','ruta');
    desplegable2_0.addItem('Sub-Seccion 2.2','ruta');
    desplegable2_0.addItem('Sub-Seccion 2.3','ruta');
    desplegable1.addItem('Seccion 3','ruta');

    TransMenu.renderAll();
    }


    numero-de-menus.txt

    function init()
    {
    if (TransMenu.isSupported())
    {
    TransMenu.initialize();

    desplegable1.onactivate = function() { document.getElementById('desplegable1').className = 'hover'; };
    desplegable1.ondeactivate = function() { document.getElementById('desplegable1').className = ''; }

    }
    }
    en definir-menus tienes:


    if (TransMenu.isSupported())
    {
    var ms=new TransMenuSet(TransMenu.direction.down,1,0, TransMenu.reference.bottomLeft);

    var desplegable1 = ms.addMenu(document.getElementById('desplegable1'));
    desplegable1.addItem('Seccion 1','ruta');
    desplegable1.addItem('Seccion 2','ruta');
    var desplegable2_0 = desplegable1.addMenu(desplegable1.items[1]);
    desplegable2_0.addItem('Sub-Seccion 2.1','ruta');
    desplegable2_0.addItem('Sub-Seccion 2.2','ruta');
    desplegable2_0.addItem('Sub-Seccion 2.3','ruta');
    desplegable1.addItem('Seccion 3','ruta');

    TransMenu.renderAll();
    }



    y es:

    if (TransMenu.isSupported())
    {
    var ms=new TransMenuSet(TransMenu.direction.down,1,0, TransMenu.reference.bottomLeft);
    var desplegable1 = ms.addMenu(document.getElementById('desplegable1'));
    desplegable1.addItem('Seccion 1','ruta');
    desplegable1.addItem('Seccion 2','ruta');
    var desplegable1_0 = desplegable1.addMenu(desplegable1.items[1]);
    desplegable1_0.addItem('Sub-Seccion 2.1','ruta');
    desplegable1_0.addItem('Sub-Seccion 2.2','ruta');
    desplegable1_0.addItem('Sub-Seccion 2.3','ruta');
    desplegable1.addItem('Seccion 3','ruta');
    desplegable1.addItem('Seccion 4','ruta');
    desplegable1.addItem('Seccion 5','ruta');
    var desplegable1_0 = desplegable1.addMenu(desplegable1.items[4]);
    desplegable1_0.addItem('Sub-Seccion 5.1','ruta');
    desplegable1_0.addItem('Sub-Seccion 5.2','ruta');

    TransMenu.renderAll();
    }
    sigue sin funcionar el menu desplegable, no me muestra nada al colocar el cursor en Seccion 1. Ya hice todos los cambios sugeridos. Gracias
    ErnestoPerez escribió:Primero los felicito por tan instructiva página, es exelente.
    Adjunto el html y css. No me funciona:
    1 - Color fondo de la pagina
    2 - El menu desplegable

    Gracias por su asistencia

    plantilla.html esta así:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>Page title</title>
    <link rel="stylesheet" href="estilo-general.css" type="text/css" media="all">
    <link rel="stylesheet" href="estilo-menu-desplegable.css" type="text/css" media="all">
    <script language="JavaScript" src="no-tocar.txt" type="text/javascript"></script>
    <sctipt language="JavaScript" src="numero-de-menus.txt" type="text/javascript"></script>
    </head>
    <body>
    <div id="global">
    Hola: creo , por lo que he visto en tu página html que no has puesto en el body (el que está encima de el Div Global) lo siguiente:
    <body onload="init();"> Puede que ese sea tu problema.
    Agradecido de los que aprenden enseñando