, , Ive . , . Firefox 3.6, . , , - :hover Internet Explorer. - .
, , , Javascript IE - :hover , display: none:
Suckerfish
http://www.alistapart.com/articles/dropdowns
Suckerfish
http://www.htmldog.com/articles/suckerfish/
CSS:
http://www.456bereastreet.com/archive/200905/hiding_with_css_problems_and_solutions/
, . -, HTML. . , - . , CSS, .
, . , - 1-3, a span.
HTML . UL active:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<link rel="stylesheet" type="text/css" href="test.css" media="screen" />
<title>Horizontal Menus</title>
</head>
<body>
<div id="topnav">
<ul>
<li>Menu 1
<ul class="active">
<li><a href="#">Page 1-1</a></li>
<li><a href="#">Page 1-2</a></li>
<li><a href="#">Page 1-3</a></li>
<li><a href="#">Page 1-4</a></li>
</ul>
</li>
<li>Menu 2
<ul>
<li><a href="#">Page 2-1</a></li>
<li><a href="#">Page 2-2</a></li>
<li><a href="#">Page 2-3</a></li>
<li><a href="#">Page 2-4</a></li>
<li><a href="#">Page 2-5</a></li>
</ul>
</li>
</ul>
</div>
</body>
</html>
CSS , . , - , . , :
#topnav {
position: relative;
}
#topnav ul {
list-style: none;
margin: 0;
padding: 0;
position: absolute;
left: 0;
width: 50em;
height: 1.5em;
background: #eeeeee;
}
#topnav li {
float: left;
width: 10em;
}
#topnav ul ul {
position: absolute;
left: -999em;
}
#topnav ul li:hover ul, #topnav ul ul.active {
left: 0;
}
#topnav ul li:hover ul {
z-index: 200;
background: #cccccc;
}
#topnav ul ul.active {
z-index: 100;
background: #aaaaaa;
}
!