A good HTML + CSS menu example

Source: Internet
Author: User

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> untitled document </title>
<Style type = "text/CSS">
Body {
Margin: 36px 0 20px 0;
Background-color: # FFF;
Text-align: center;
}

A img {
Border: none;
}

FORM {
Margin: 0;
Padding: 0;
}

. Cleared {
Clear: both;
Line-Height: 0;
}

. Clear {
Clear: both;
}

Table {
Border-collapse: collapse;
}

TD {
Vertical-align: top;
}

# Navbar {
Background-color: #303030;
Margin: 2px 0 0 0;
Height: 30px;
}

# Navbar ul Li {
List-style-type: none;
Display: block;
Float: left;
}

# Navbar ul Li {
Color: # d6d6d6;
Border-Right: 1px solid # FFF;
}

# Navbar ul Li A: hover {
Background-color: #415166;
Color: # FFF;
Text-Decoration: none;
}

# Bodycontent {
Background: URL (../images/2col_bg.gif) top center repeat-y;
Padding: 0 20px;
}

# Bodycontent {
Font-weight: bold;
}

/* Dropdowns */

# Nav, # nav ul {
Padding: 0;
Margin: 0;
List-style: none;
}

# Nav {
Display: block;
}

# Nav Li ul {
Position: absolute;
Left:-999em;
}

# Nav Li: hover ul, # nav Li. sfhover ul {
Left: auto;
}

# Nav Li ul Li {
Background-color: #303030;
Color: # f2f2f2;
Font-size: 12px;
Padding: 5px 0 2px 7px;
Border-top: 1px solid # FFF;
Font-weight: bold;
}

# Nav ul Li A: hover {
Text-Decoration: none;
Background-color: #415166;
Color: # FFF;
Font-size: 12px;
Font-weight: bold;
}

/* # Nav ul Li A. Last {border-bottom: none ;}*/

# Submenuabout, # submenuabout Li a, # submenuabout Li A: hover {width: 130px ;}

# Submenuservices, # submenuservices Li a, # submenuservices Li A: hover {width: 160px ;}

# Submenuportfolio, # submenuportfolio Li a, # submenuportfolio Li A: hover {width: 100px ;}

# Submenuresources, # submenuresources Li a, # submenuresources Li A: hover {width: 120px ;}

# Submenunews, # submenunews Li a, # submenunews Li A: hover {width: 100px ;}

</Style>
<Script language = "JavaScript" type = "text/JavaScript">
<! -- // --> & Lt ;! [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 );

// --> <!] & Gt;
</SCRIPT>
</Head>

<Body>

<Div id = "navbar">
<Ul id = "nav">
<Li> <a href = "/" tabindex = "10" Title = "return to the quirk home page"> </a> </LI>
<Li id = "menuabout"> <a href = "/about" tabindex = "1" Title = "about quirk"> </a>
<Ul id = "submenuabout">
<Li> <a href = "/about" Title = "about quirk"> about us </a> </LI>
<Li> <a href = "/team/members" Title = "the team at quirk" class = "last"> our team </a> </LI>
<Li> <a href = "/career/wannawork. Q" Title = "emarketing careers"> wannawork @ quirk? </A> </LI>

</Ul> </LI>
<Li id = "menuservices"> <a href = "/services" tabindex = "2" Title = "the services offered by quirk"> </a>
<Ul id = "submenuservices">
<Li> <a href = "/services" Title = "emarketing strategy"> emarketing strategy </a> </LI>
<Li> <a href = "/website-development/home" Title = "website design and development"> website development </a> </LI>
<Li> <a href = "/searchengine-marketing/home" Title = "all about search engine marketing"> search engine marketing </a> </LI>
<Li> <a href = "/emarketing/PPC" Title = "Pay Per Click advertising"> Pay Per Click </a> </LI>

<Li> <a href = "/emarketing/online-advertising" Title = "online and banner advertising"> online advertising </a> </LI>
<Li> <a href = "/emarketing/affiliate" Title = "Affiliate marketing and management"> affiliate marketing </a> </LI>
<Li> <a href = "/emarketing/viral" Title = "viral marketing and campaigns"> viral marketing </a> </LI>
<Li> <a href = "/emarketing/Web-Pr" Title = "Web based public relations services"> Web Pr </a> </LI>
<Li> <a href = "/email-marketing/home" Title = "email marketing"> email marketing </a> </LI>
<Li> <a href = "/emarketing/conversion" Title = "conversion optimisation"> conversion optimisation </a> </LI>
</Ul> </LI>

<Li id = "menuportfolio"> <a href = "/portfolio/home" tabindex = "3" Title = "a portfolio of our work"> </a>
<Ul id = "submenuportfolio">
<Li> <a href = "/portfolio/home" Title = "a portfolio of our work"> our work </a> </LI>
<Li> <a href = "/portfolio/clients" Title = "quirks 'client list"> clients </a> </LI>
<Li> <a href = "/portfolio/testimonials" Title = "client testimonials" class = "last"> testimonials </a> </LI>
</Ul> </LI>
<Li id = "menuresources"> <a href = "/resources/home" tabindex = "4" Title = "useful resources"> </a>
<Ul id = "submenuresources">

<Li> <a href = "/searchstatus" Title = "searchstatus Firefox pluging"> searchstatus </a> </LI>
<Li> <a href = "/resources/clicktracks" Title = "click tracks"> clicktracks </a> </LI>
<Li> <a href = "/resources/articles. Q" Title = "articles by quirk"> articles </a> </LI>
<Li> <a href = "/resources/JSE-Report" Title = "JSE Top 100 Seo Report"> JSE Report </a> </LI>
<Li> <a href = "/resources/links" Title = "links to useful sites"> Links </a> </LI>
<Li> <a href = "/resources/myquirk" Title = "myquirk"> myquirk </a> </LI>

<Li> <a href = "/resources/newsletterarchive. Q" Title = "newsletter Archive"> newsletter archive </a> </LI>
<Li> <a href = "/resources/vault. Q" Title = "viral video clip Archive"> viral vault </a> </LI>
</Ul> </LI>
<Li id = "menunews"> <a href = "/news. q "tabindex =" 5 "Title =" latest quirk news and our newsletter archives "> </a>
<Ul id = "submenunews">
<Li> <a href = "/news. Q" Title = "all the latest quirk News"> latest news </a> </LI>
<Li> <a href = "http://www.gottaquirk.com" Title = "The quirk blog" target = "_ blank"> blog </a> </LI>

</Ul> </LI>
<Li style = "border-Right: none;"> <a href = "/contact/contactus. q "tabindex =" 6 "Title =" Contact quirk "> </ a> </LI>
</Ul> </div>

</Div>
</Body>
</Html>
 

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.