ul { margin: 0; padding: 0; list-style: none; width: 150px; }
li ul { position: absolute; left: 149px; top: 0; display: none; }
ul li a { display: block; text-decoration: none; color: #777; background: #e7f5fe; padding: 5px; border: 0px 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: 0px solid #ccc; }
li:hover ul { display: block; }
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;
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 */
li ul { position: absolute; left: 149px; top: 0; display: none; }
ul li a { display: block; text-decoration: none; color: #777; background: #e7f5fe; padding: 5px; border: 0px 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: 0px solid #ccc; }
li:hover ul { display: block; }
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;
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 */
Комментариев нет