Jubijub Parce que je le VD bien | edit : j'ai trouvé : il suffit de mettre le style sur le <a> ... ct plutot évident en plus
Code :
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html>
- <head>
- <title>Suckerfish Dropdowns - One Level Bones</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <style type="text/css">
- body {
- font-family: arial, helvetica, serif;
- }
- #nav, #nav ul { /* all lists */
- padding: 0;
- margin: 0;
- list-style: none;
- line-height: 1;
- }
- #nav a {
- display: block;
- width: 250px;
-
- }
- .first {
- background-color: #80E3F3;
- }
- a.first {
- text-align: center;
- }
- #nav li { /* all list items */
- float: left;
- width: 250px; /* width needed or else Opera goes nuts */
- }
- #nav li ul { /* second-level lists */
- position: absolute;
- background: orange;
- width: 250px;
- left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */
- }
- #nav li:hover ul, #nav li.sfhover ul { /* lists nested under hovered list items */
- left: auto;
- }
- #content {
- clear: left;
- color: #589BA6;
- }
- #conteneur {
- position: absolute;
- width: 750px;
- left: 50%;
- margin-left: -375px;
- background-color: #F2F2F2;
- }
-
- </style>
- <script type="text/javascript"><!--//--><![CDATA[//><!--
- sfHover = function() {
- var sfEls = document.getElementById("nav" ).getElementsByTagName("LI" );
- for (var i=0; i<sfEls.length; i++) {
- sfEls[i].onmouseover=function() {
- this.className+=" sfhover";
- }
- sfEls[i].onmouseout=function() {
- this.className=this.className.replace(new RegExp(" sfhover\\b" ), "" );
- }
- }
- }
- if (window.attachEvent) window.attachEvent("onload", sfHover);
- //--><!]]></script>
- </head>
- <body>
- <div id="conteneur">
- <h1>PERCIFORMES! (1)</h1>
- <p>Welcome to the world of Perciformes - perch-like fish including the world famous <strong>Suckerfish</strong></p>
- <ul id="nav">
- <li class="first"><a class="first" href="#">Percoidei</a>
- <ul>
- <li><a href="#">Remoras</a></li>
- <li><a href="#">Tilefishes</a></li>
- <li><a href="#">Bluefishes</a></li>
- <li><a href="#">Tigerfishes</a></li>
- </ul>
- </li>
- <li class="first"><a class="first" href="#">Anabantoidei</a>
- <ul>
- <li><a href="#">Climbing perches</a></li>
- <li><a href="#">Labyrinthfishes</a></li>
- <li><a href="#">Kissing gouramis</a></li>
- <li><a href="#">Pike-heads</a></li>
- <li><a href="#">Giant gouramis</a></li>
- </ul>
- </li>
- <li class="first"><a class="first" href="#">Gobioidei</a>
- <ul>
- <li><a href="#">Burrowing gobies</a></li>
- <li><a href="#">Dartfishes</a></li>
- <li><a href="#">Eellike gobies</a></li>
- <li><a href="#">Gobies</a></li>
- <li><a href="#">Loach gobies</a></li>
- <li><a href="#">Odontobutidae</a></li>
- <li><a href="#">Sandfishes</a></li>
- <li><a href="#">Schindleriidae</a></li>
- <li><a href="#">Sleepers</a></li>
- <li><a href="#">Xenisthmidae</a></li>
- </ul>
- </li>
- </ul>
- <div id="content">
- <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse egestas ultricies pede. Phasellus suscipit blandit risus. Praesent nonummy. In erat. Duis nibh pede, accumsan eu, pulvinar et, volutpat vel, elit. Curabitur nec dui sed nunc congue tempus. Nulla ac dui ac libero fringilla nonummy. Maecenas ullamcorper sodales risus. Vivamus pretium dolor. Proin eu turpis. Phasellus ut mauris non nulla mattis luctus. Nunc porttitor dapibus sapien. In malesuada fermentum metus. Nulla egestas, tellus a vestibulum pharetra, nunc purus auctor lacus, ut semper purus ipsum eu velit. Praesent dui. Nulla accumsan turpis at erat.</p>
- <p><a href="/articles/suckerfish/dropdowns/">Suckerfish Dropdowns</a> by <a href="/ptg/">Patrick Griffiths</a> and <a href="http://www.danwebb.net">Dan Webb</a>.</p>
- </div>
- </div>
- </body>
- </html>
|
Message édité par Jubijub le 06-05-2005 à 14:17:01 ---------------
Jubi Photos : Flickr - 500px
|