Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Samurai Pelado

Menu Drop Down

Recommended Posts

AE GALERA, fiz um meno drop down, igualzinho desse tuto aki, link e esse aqui é o meu meu maldito menu q naum funciona, o sub menu naum aparece :angry: ...... ALGUEM sabe o q q ta errado? :) o meu codigo ta assim ó:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

 

<style type="text/css">

<!--

@import url(font_padrao.css);

-->

 

startList = function() {

if (document.all&&document.getElementById) {

navRoot = document.getElementById("nav");

for (i=0; i<navRoot.childNodes.length; i++) {

node = navRoot.childNodes;

if (node.nodeName=="LI") {

node.onmouseover=function() {

this.className+=" over";

}

node.onmouseout=function() {

this.className=this.className.replace»

(" over", "");

}

}

}

}

}

window.onload=startList;

 

ul {

margin: 0;

padding: 0;

list-style: none;

width: 150px;

}

 

ul li {

position: relative;

}

 

li ul {

position: absolute;

left: 149px;

top: 0;

display: none;

}

 

ul li a {

display: block;

text-decoration: none;

color: #777;

background: #fff;

padding: 5px;

border: 1px solid #ccc;

border-bottom: 0;

}

 

/* Fix IE. Hide from IE Mac \*/

* html ul li { float: left; }

* html ul li a { height: 1%; }

/* End */

 

ul {

margin: 0;

padding: 0;

list-style: none;

width: 150px;

border-bottom: 1px solid #ccc;

}

 

li: hover ul { display: block; }

 

li:hover ul, li.over ul {

display: block; }

 

<ul id="nav">

 

/* Fix IE. Hide from IE Mac \*/

* html ul li { float: left; height: 1%; }

* html ul li a { height: 1%; }

/* End */

 

 

</style>

</head>

 

<body>

<ul>

<li class="texto"><a href="#">Home</a></li>

<li><span class="texto"><a href="#">About</a> </span>

<ul>

<li class="texto"><a href="#">History</a></li>

<li class="texto"><a href="#">Team</a></li>

<li class="texto"><a href="#">Offices</a></li>

</ul>

</li>

<li><span class="texto"><a href="#">Services</a> </span>

<ul>

<li class="texto"><a href="#">Web Design</a></li>

<li class="texto"><a href="#">Internet Marketing</a></li>

<li class="texto"><a href="#">Hosting</a></li>

<li class="texto"><a href="#">Domain Names</a></li>

<li class="texto"><a href="#">Broadband</a></li>

</ul>

</li>

<li><span class="texto"><a href="#">Contact Us</a> </span>

<ul>

<li class="texto"><a href="#">United Kingdom</a></li>

<li class="texto"><a href="#">France</a></li>

<li class="texto"><a href="#">USA</a></li>

<li class="texto"><a href="#">Australia</a></li>

</ul>

</li>

</ul>

 

 

</body>

</html>

 

SERA q tem algo sobrando, faltando... por favor... isso é urgente!!! http://forum.imasters.com.br/public/style_emoticons/default/cry.gif

 

obrigado. http://forum.imasters.com.br/public/style_emoticons/default/joia.gif

Compartilhar este post


Link para o post
Compartilhar em outros sites

(......)

<body>

<ul>

  <li class="texto"><a href="#">Home</a></li>

  <li><span class="texto"><a href="#">About</a> </span>

    <ul>

      <li class="texto"><a href="#">History</a></li>

      <li class="texto"><a href="#">Team</a></li>

      <li class="texto"><a href="#">Offices</a></li>

    </ul>

  </li>

  <li><span class="texto"><a href="#">Services</a> </span>

(......)

coloca a ID=NAV na UL principal(raíz)

 

<body><ul id="nav">  <li class="texto"><a href="#">Home</a></li>  <li><span class="texto"><a href="#">About</a> </span>     <ul>      <li class="texto"><a href="#">History</a></li>...etc...
no javaScript q você usou pra fazer o dropdown funcionar no IE tem uma função q procura pela ID="NAV" .. olha aí pra você ver.. se você quiser usar uma id diferente de nav você tem q mudar o valor "nav"no javascript..

 

navRoot = document.getElementById("nav");

agora o seu menu deve funcionar..

 

levou só alguns meses pra alguem responder... hehehe

espero q tenha adiantado pra alguma coisa.. ou pra alguem...

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.