Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Need help making this css navigation with sub menus...
Old 10-03-2009, 01:36 PM Need help making this css navigation with sub menus...
Average Talker

Posts: 27
Name: Wendel
Trades: 0
so i have this navigation menu @ www.maingeargaming.com/menu/ but i cant figure out how to add sub menu's to it :\

Here's the HTML code:
Code:
<body id="body_home">

<div id="container">

<ul id="nav">
<li id="nav_home"><a href="index.php">Home</a></li>
<li id="nav_about"><a href="about.php">About</a></li>
<li id="nav_gallery"><a href="gallery.php">Gallery</a></li>
<li id="nav_services"><a href="services.php">Services</a></li>
<li id="nav_contact"><a href="contact.php">Contact</a></li>
</ul>

</div>

</body>
And here is the CSS:
Code:
#nav {
width: 728px;
height: 40px;
position: relative;
background: url(../img/nav_main.png);
margin: 0;
padding: 0;
}

#nav li {
float: left;
}

#nav li a {
position: absolute;
top: 0;
margin: 0;
padding: 0;
display: block;
height: 40px;
background: url(../img/nav_main.png) no-repeat;
text-indent: -9999px;
overflow: hidden;
}

/*up state*/
li#nav_home a {
left: 0;
width: 145px;
background-position: 0 0;
}

li#nav_about a {
left: 145px;
width: 145px;
background-position: -145px 0;
}

li#nav_gallery a {
left: 290px;
width: 145px;
background-position: -290px 0;
}

li#nav_services a {
left: 435px;
width: 145px;
background-position: -435px 0;
}

li#nav_contact a {
left: 580px;
width: 148px;
background-position: -580px 0;
}

/*hover state*/
li#nav_home a:hover {
background-position: 0 -45px;
}

li#nav_about a:hover {
background-position: -145px -45px;
}

li#nav_gallery a:hover {
background-position: -290px -45px;
}

li#nav_services a:hover {
background-position: -435px -45px;
}

li#nav_contact a:hover {
background-position: -580px -45px;
}

/*current state*/
#body_home li#nav_home a {
background-position: 0 -90px;
}

#body_about li#nav_about a {
background-position: -145px -90px;
}

#body_gallery li#nav_gallery a {
background-position: -290px -90px;
}

#body_services li#nav_services a {
background-position: -290px -90px;
}

#body_contact li#nav_contact a {
background-position: -290px -90px;
}
Any help would be much appreciated. thank you.
m1nd is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-03-2009, 02:47 PM Re: Need help making this css navigation with sub menus...
StylaStyla's Avatar
Mad Man

Posts: 401
Name: Styla
Location: City of London
Trades: 0
check out

http://www.alistapart.com/articles/horizdropdowns/
http://www.cssplay.co.uk/menus/ (go to multi-level dropdown).
__________________
Freelance Graphic Designer not for hire
StylaStyla is offline
Reply With Quote
View Public Profile Visit StylaStyla's homepage!
 
Reply     « Reply to Need help making this css navigation with sub menus...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.09602 seconds with 12 queries