Advanced Search Usage Terms Submit Contact
Dynamic Drive CSS Library
 
CSS Library
Submit an original CSS code
CSS Layouts
Web Graphics
Online Tools:

Advertise Here

CSS Library: Horizontal CSS Menus: Here

jQuery Drop Line Tabs

Author: Dynamic Drive

This menu turns a nested UL list into a horizontal drop line tabs menu. The top level tabs are rounded on each side thanks to the use of two transparent background images, while the sub ULs each appear as a single row of links that drop down when the mouse rolls over its parent LI. The menu also manages to sneak in a little CSS3, making use of the "border-radius" property to give each link within the sub ULs rounded edges when the mouse hovers over them..

Note that the two transparent gifs that help create the rounded corner tabs assume your page has a white background. If it doesn't, you'll need to edit the image's background to match your page's. The tradeoff is that you can the tabs' background color can be changed just by editing the CSS alone.

Demo:

Important: Make sure your page contains a valid doctype for this menu to render properly.

The external files: The menu requires the following support files, which you should upload by default all to the same directory as your page itself:

The CSS/ JavaScript: The below code should be added to the HEAD section of your page:

The HTML:

Code Info

Rate this code:

Date Posted: 07/05/2009

Revision History: None

Usage Terms: Click here

Your Comments (11)

Got a question or need help customizing this CSS code? Post it in the CSS Forums. If you have a comment or suggestion instead, post it in the comments section below.

Comment Pages 1 of 2 pages  1 2 >

very nice article…keep on the good work
Posted by SharePoint developer on 07/08, 04:58 AM
A good start, but two suggestions:

1) Implement a .stop() to prevent animation queue buildup. See Brandon Aaron's solution:
http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup

2) Set a timeout for the menus to stay open for ~1s or so. As it stands, mousing 1 pixel off the bottom will close all layers of the menu, and can be quite frustrating to users.


-- SEAN O
Posted by Sean O on 07/08, 07:44 AM
This is having strange spacing issues in Chrome & probably Safari... The second level of dropline has a huge gap over it making it impossible to click on.
Posted by JKirchartz on 07/08, 08:23 AM
What version of Chrome are you having the issue in? Using Chrome 2.0.172.33, I see no gaps.
Posted by ddrive on 07/09, 02:52 PM
Where do you put the code to stop the animation buildup? Otherwise the menu works fabulously.
Posted by kmisra on 07/10, 05:54 AM
all of your product is so good for w3
Posted by Seng Rean Sey on 07/18, 07:04 AM
Спасибо за ваши менюшки!
Posted by HTML-pedia on 07/19, 10:26 AM
Thanks for this!
Posted by nice on 07/22, 11:31 AM
Thanks a ton!!!
Posted by Aryan on 07/24, 02:09 PM
I want to use above tutorial in order to show sub menus as shown at www.forbes.com i,e. when I first load the website, home tab and its sub menu with same background color must be shown. When I switch to other tabs home tab background color should become normal and tab that I have clicked should change its background color to white along with its sub menu.
Posted by Shravan on 07/27, 01:49 AM

Comment Pages 1 of 2 pages  1 2 >


Commenting is not available in this weblog entry.
Copyright 2006-2014 Dynamic Drive Read our Usage Terms before using any of the CSS codes.