CSS Library: Horizontal CSS Menus: Here
DD Color Tabs
Author: Dynamic Drive
This is a lightweight, very easy to customize image tabs menu similar to the one you see throughout Dynamic Drive. Instead of swapping between two tab images, this menu uses a unified transparent tab instead. What this means is that you can in fact change the menu and menu hover colors just by changing the two color values inside the CSS code! It doesn't get simpler than that.
The two colors used in this menu are: #8b0000 and #d50509. Just by changing these two colors, you instantly create a different theme for the menu tabs. There's no need to touch the images in any way unless your page's background image isn't white. In that case you'll have to modify the images' corners' background color so they match that of the page's.
Demo:
The two images (resized for easier download):
![]()
The CSS:
Rate this code:
Date Posted: 05/07/2006
Revision History:
June 12th, 06': Fixed HTML code for separator bar height issue in IE.
Usage Terms: Click here
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 9 pages 1 2 3 > Last »
Teach people to use conditional comments if you have to, but please no CSS hacks...
Similarly, you're using a style block instead of an external file.
Lastly, why are you styling
span
[S]tyle blocks...are often appropriate when doing testing.While style blocks are sometimes usefull for initial development, by the time I'm ready for tweeking, I've long since moved them off the page. In fact, I often find it more cumbersome to edit the styles during development when they're in the html file. Perhaps this is because I use an editor for the editing and browsers for the rendering.
Dropping the point about style blocks, the bigger question still remains: Why use in-line styles?
<li style="margin-left: 1px"><a href="http://www.dynamicdrive.com" title="Home"><span>Home</span></a></li>
The "margin-left" definition is to overcome a Opera bug that causes the first tab to not render correctly if omitted. So I consider it sort of a off the cuff fix, and hence it's defined inline.

