Download Source Code
View a Demo
Horizontal navigation menus are one of the (if not THE) most common user interface elements used across the web. They provide an easy way for a user to both navigate a web site as well as quickly determine, at a glance, what section of the web site they are currently on.
The code below generates a customizable horizontal, tabbed menu with a set height of 75 pixels. If you want to change the height of the menu you will have to create new images and also modify the height settings in the CSS code. With that in mind, I have included the Photoshop file I used to create the menu in the zipped archive for you to reference.
I have tested this in Firefox (2,3,3.5), IE7, IE8, Safari, Opera, and Chrome and it looks good across all of them (if you experience an issue in another browser, please let me know by commenting on this post).

<ul id="LATabs"> <li class="current_page_item"><a href="" title="Home"><span class="tLeft"></span><span class="tMid">Home</span><span class="tRight"></span></a></li> <li><a href="" title="Menu Item 1"><span class="tLeft"></span><span class="tMid">Menu Item 1</span><span class="tRight"></span></a></li> <li><a href="" title="Menu Item 2"><span class="tLeft"></span><span class="tMid">Menu Item 2</span><span class="tRight"></span></a></li> </ul>
ul#LATabs{
float:left;
margin: 0;
padding:0;
list-style-type: none;
width:100%;
height:75px;
background: #b71e1a url(bg.gif) center center repeat-x;
font: 24px "Lucida Sans Unicode", "Lucida Grande", sans-serif;
color: #fff;
}
ul#LATabs li{
float:left;
padding: 0;
height: 75px;
margin: 0 10px;
}
ul#LATabs a{color:#fff;text-decoration: none;cursor: pointer;}
ul#LATabs a:hover{color: #e3e3e3;}
ul#LATabs .current_page_item a{color: #b71e1a;}
ul#LATabs .current_page_item a:hover{color: #b71e1a;}
ul#LATabs span{float:left;height: 75px;}
ul#LATabs .tLeft, ul#LATabs .tRight{width:8px;}
ul#LATabs .tMid{padding: 23px 15px 0px 15px;}
ul#LATabs .current_page_item .tLeft{
background-image: url(tab_01.png);
background-position: top left;
background-repeat: no-repeat;
}
ul#LATabs .current_page_item .tMid{
background-image: url(tab_02.png);
background-position: top left;
background-repeat: repeat-x;
}
ul#LATabs .current_page_item .tRight{
background-image: url(tab_03.png);
background-position: top left;
background-repeat: no-repeat;
}
Download Source Code
View a Demo

I'm a web developer, UI/UX specialist and online strategist with over 10 years of experience in the field. I am currently freelancing and am available for hire. I have hands-on experience in all stages of the SDLC. If you or your business needs a web site, could use some help with your online strategy, or if you need to get started with SEM, please feel free to contact me.
I can help you with: Web Site Design and Development, Search Engine Optimization, Search Engine Marketing, Multivariate Testing, Metrics Analysis, Campaign Optimization, Social Site Integration, E-mail Marketing and everything else that has to do with the Web.
I work/haved worked with the following technologies: XHTML, CSS, Javascript, Ajax, JQuery, MySQL, SQL Server, ASP, ASP.Net, Coldfusion, PHP, Wordpress, Flash, Google Analytics, Google Adwords.
Wow!, this was a real quality post. In theory I’d like to write like this too – taking time and real effort to make a good article… but what can I say… I procrastinate a lot and never seem to get something done
[div style="width:100%; height:75px; background:#b71e1a url(bg.gif) center center repeat-x"]
[ul id="LATabs" style="width:600px;"]
Good stuff Leon.
The only issue I see is that when the browser window is re-sized to a width that is smaller than 600px (the width of the UL tag), the tabs get stacked on top of each other. To remedy this I would wrap a DIV tag around the the UL tag and give the DIV a 100% width and give the UL an absolute width.
i.e.:
rest of code…
-George