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

Animated horizontal tabs

Author: Dynamic Drive

These sliding doors based blue tinted tabs "jump up" when selected, such as when the mouse rolls over each one. This is accomplished using a combination of relative positioning and padding on each tab. The selected tab is first stretched vertically by giving it a thick bottom padding, then plucked out thanks to the CSS "top" property value that's smaller than the normal tabs'. The result are tabs that animate without any scripting.

BTW, the amount the selected tab jump up can be easily adjusted- refer to the comments inside the CSS.

Demo:

The two images used:

The CSS:

The HTML:

Code Info

Rate this code:

Date Posted: 04/12/2008

Revision History: None

Usage Terms: Click here

Your Comments (35)

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 4 of 4 pages « First  <  2 3 4

hello how can i change the tab from top to bottom ,so when i make mouseover the tab must came from the top to the bottom
Posted by hups on 11/28, 04:56 AM
The concept is very nice, and its looking good, i like the button style
Posted by manikandan S on 11/28, 07:16 AM
if you have the above div (animatedtabs) inside a wrapper div with a certain width (say 600px), how would you get the tabs to be centered inside the wrapper div?
Posted by Vince on 11/30, 01:05 PM
I know someone earlier said to add a margin: auto and then to manually set the width with which the buttons will take up. This is not a very good fix, as then if the user increases the size of the font in their browser, the buttons enlarge and then take up two lines since the width is hard coded and does not expand to accommodate the change in text size.
Posted by Vince on 11/30, 03:08 PM
thansk you it is very useful script. Cheer. thanks
Posted by angkorboy on 11/30, 08:26 PM

Comment Pages 4 of 4 pages « First  <  2 3 4

Name: (Required)

Email: (Required)

(NOT shown on page)

URL:

(Shown on page if entered)

Comments: (Required)

Supported BB codes: [b], [i], [u], [em], [strike], [strong], [pre], [code], and [blockquote].

Remember my personal information
Notify me of follow-up comments?

Submit the word you see below ("previewing" post does not require it):


Copyright 2006-2008 Dynamic Drive Read our Usage Terms before using any of the CSS codes.
Dynamic Drive DHTML and CSS Code Library