Pure css second-level navigation menu [supports IE6 and IE7]

Source: Internet
Author: User
Tip: you can modify some code before running

<div id="outer"><div id="menuHolder"><ul id="dropline"><li class="first"><b>Home</b><!--[if gte IE 7]><!--><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><div><ul class="blank"><li></li></ul></div><!--[if lte IE 6]></td></tr></table><![endif]--></li><li><b>Single Level</b><!--[if gte IE 7]><!--><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><div><ul class="blank"><li></li></ul></div><!--[if lte IE 6]></td></tr></table><![endif]--></li><li><b>Dropdown</b><!--[if gte IE 7]><!--><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><div><ul><li>Dropdown One</li><li>Dropdown Two</li><li>Dropdown Three</li><li>Dropdown Four</li><li>Dropdown Five</li></ul></div><!--[if lte IE 6]></td></tr></table><![endif]--></li><li class="current"><b>Dropline</b><!--[if gte IE 7]><!--><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><div><ul><li>Dropline One</li><li class="current_sub">Dropline Two</li><li>Dropline Three</li><li>Dropline Four</li></ul></div><!--[if lte IE 6]></td></tr></table><![endif]--></li><li><b>Flyout</b><!--[if gte IE 7]><!--><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><div><ul class="right"><li>Flyout One</li><li>Flyout Two</li><li>Flyout Three</li><li>Flyout Four</li><li>Flyout Five</li></ul></div><!--[if lte IE 6]></td></tr></table><![endif]--></li><li><b>Support</b><!--[if gte IE 7]><!--><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><div><ul class="blank"><li></li></ul></div><!--[if lte IE 6]></td></tr></table><![endif]--></li><li class="last"><b>Contact</b><!--[if gte IE 7]><!--><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]--><div><ul class="blank"><li></li></ul></div><!--[if lte IE 6]></td></tr></table><![endif]--></li></ul></div></div><style>#outer {width:1000px; position:absolute; top:145px; left:0; background:transparent; height:70px; overflow:hidden;}#menuHolder {position:relative; float:left; left:50%;}#dropline {padding:0; margin:0; list-style:none; float:left; position:relative; right:50%;}#dropline div {position:absolute; left:-9999px; width:100%; z-index:10; height:35px; border-top:4px solid #e60; top:35px; background:#fff;}#dropline ul {padding:0; margin:0; list-style:none;}#dropline table {border-collapse:collapse: padding:0; margin:-1px -10px; width:0; height:0;}#dropline li ul {position:relative; float:left; left:50%;}#dropline li ul li {float:left; position:relative; right:50%;}#dropline li ul li a {display:block; float:left; padding:0 10px; background:transparent; color:#000; font-weight:bold;}#dropline li ul li a:hover {text-decoration:underline; background:transparent; color:#000;}#dropline li {float:left; margin-right:1px;}#dropline li.last {margin:0;}#dropline li a {display:block; float:left; height:35px; padding:0 0 0 20px; line-height:30px; text-decoration:none; font-family:"trebuchet MS", sans-serif; font-size:13px; text-decoration:none; color:#000; background:url(yun_qi_img/20091215072746.png);}#dropline li a b {display:block; float:left; height:35px; padding:0 20px 0 0; background:url(yun_qi_img/20091215072746.png) right top; cursor:pointer;}#dropline li a:hover {background:url(yun_qi_img/20091215072808.png); color:#fff; border:0;}#dropline li a:hover b {background:url(yun_qi_img/20091215072808.png) right top;}#dropline li:hover > a {background:url(yun_qi_img/20091215072808.png); color:#fff; border:0;}#dropline li:hover > a b {background:url(yun_qi_img/20091215072808.png) right top;}#dropline :hover div {left:0;}#dropline li.current a,#dropline li.current a:hover {background:url(yun_qi_img/20091215072832.png); color:#fff; font-weight:bold;}#dropline li.current a b,#dropline li.current a:hover b {background:url(yun_qi_img/20091215072832.png) right top; color:#fff;}#dropline li.current a:hover ul li a:hover {color:#000; background:transparent;}#dropline li.current:hover ul li a:hover {color:#000; background:transparent;}#dropline li.current div {width:100%; left:0; top:35px; background:#fff; z-index:5;}#dropline li.current ul {position:relative; float:left; left:50%;}#dropline li.current ul li {float:left; position:relative; right:50%;}#dropline li.current ul li a {display:block; float:left; padding:0 10px; background:transparent; color:#000; font-weight:bold;}#dropline li.current ul li.current_sub a {display:block; float:left; padding:0 10px; background:transparent; color:#c00; text-decoration:underline;}#dropline li.current ul li.current_sub a:hover {text-decoration:underline; background:transparent; color:#c00;}* html #dropline li.current div {width:expression(document.getElementById('dropline').offsetWidth);}* html #dropline li a:hover div {width:expression(document.getElementById('dropline').offsetWidth);}</style>
Tip: you can modify some code before running
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.