Ver Mensaje Individual
  #4 (permalink)  
Antiguo 22/01/2009, 08:05
Avatar de willyfc
willyfc
 
Fecha de Ingreso: octubre-2008
Ubicación: Santa Cruz - Bolivia
Mensajes: 662
Antigüedad: 15 años, 7 meses
Puntos: 40
Respuesta: menu css + enlace

necesariamente tienes que utilizar algo de javascript para poder eso, solo con css no se puede, tienes que combinar ambas, te paso algo que se con el editor dreamweaver pero que si funciona y espero que sea lo quieres, copialo y pegalo en tu editor tal cual, y asegurate de tener javascript habiliatado

Código lenguaje:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Mostrar ocultar capas</title>
  6. <script type="text/javascript">
  7. function MM_findObj(n, d) { //v4.01
  8.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  9.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  10.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  11.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  12.   if(!x && d.getElementById) x=d.getElementById(n); return x;
  13. }
  14.  
  15. function MM_showHideLayers() { //v6.0
  16.   var i,p,v,obj,args=MM_showHideLayers.arguments;
  17.   for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
  18.     if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
  19.     obj.visibility=v; }
  20. }
  21. </script>
  22. <style type="text/css">
  23. #contenedor{ width:800px; height:300px; border:1px solid #333; position:relative}
  24. #menu{width:300px; height:300px; border:1px solid #333; float:left;}
  25. #cont1{ width:490px; height:300px; float:left; position:absolute; visibility:visible; margin:0 0 0 302px;}
  26. #cont2{ width:490px; height:300px; float:left; position:absolute; visibility:hidden; margin:0 0 0 302px;}
  27. #cont3{ width:490px; height:300px; float:left; position:absolute; visibility:hidden; margin:0 0 0 302px;}
  28. </style>
  29. </head>
  30.  
  31. <body onload="MM_showHideLayers('cont1','','show','cont2','','hide','cont3','','hide');">
  32. <div id="contenedor">
  33.     <div id="menu">
  34.         <ul>
  35.             <li><a href="#" onclick="MM_showHideLayers('cont1','','show','cont2','','hide','cont3','','hide');">contenido 1</a></li>
  36.             <li><a href="#"onclick="MM_showHideLayers('cont1','','hide','cont2','','show','cont3','','hide');">contenido 2</a></li>
  37.             <li><a href="#"onclick="MM_showHideLayers('cont1','','hide','cont2','','hide','cont3','','show');">contenido 3</a></li>
  38.         </ul>
  39.     </div>
  40.     <div id="cont1">
  41.         Contenido 1
  42.     </div>
  43.     <div id="cont2">
  44.         Contenido 2
  45.     </div>
  46.     <div id="cont3">
  47.         Contenido 3
  48.     </div>
  49. </div>
  50. </body>
  51. </html>

espero te sirva, como te digo el javascript que ves ahí te lo da dreamweaver y con lo demás tienes que jugar

Bienvenido a FDW
__________________
WFC
codigo82

Última edición por willyfc; 22/01/2009 a las 08:25