CSS Library: Horizontal CSS Menus: Here
Solid Block Menu
Author: Dynamic Drive
This is a lean, professional looking CSS menu that's draped in a solid two color background image. The divider between the menu items is simply a white CSS border. The style is extremely easy to customize thanks to the simple background image used.
Demo:
The two images used (resized horizontally):

The CSS:
Rate this code:
Date Posted: 03/27/2007
Revision History: July 6th 08"- Updated CSS for improved clear float 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 15 of 17 pages « First < 13 14 15 16 17 >
I have some rather long tab names ie. "Reference Books & Dictionaries. How can I get them to display on two lines on a single tab and keep the single line names like "Software" centered vertically?
Our current tab menu is .js and we want to move to CSS. Our horizontal top menu.
http://www.transcriptiongear.com
Our current tab menu is .js and we want to move to CSS. Our horizontal top menu.
http://www.transcriptiongear.com
The code is almost working..
My second "link-block" is always red..
I think it sees that block as the active block..
How do I fix this?
My second "link-block" is always red..
I think it sees that block as the active block..
How do I fix this?
is there a dropp down verison of this one?
After tinkering with several CSS classes I finally figured out how to center the buttons....remove margin-bottom: 1em; from .solidblockmenu /// replace it with margin: 0em; instead /// the borders were also removed for a smooth Web 2.0 look too...may not be syntax but it works (Note - image names were changed & code was organized)
.solidblockmenu
{
background: #000000 url(images/apps/top_menu1.gif) center center repeat-x;
border: 1px solid #595959;
border-width: 1px 1px;
float: left;
font: bold 12px arial, tahoma, verdana, helvetica, sans-serif, serif;
margin: 0em;
overflow: hidden;
padding: 0px;
width: 100%;
}
.solidblockmenu li
{
display: inline;
}
.solidblockmenu li a
{
border-center: 1px solid #FFFFFF;
color: #FFFFFF;
float: left;
margin: 1px;
padding: 7px 10px;
text-align: center;
text-decoration: none;
}
.solidblockmenu li a:hover, .solidblockmenu li .current
{
background: transparent url(images/apps/top_menu2.gif) center center repeat-x;
color: #FFFFFF;
}
.solidblockmenu li a:visited
{
color: #FFFFFF;
}
.solidblockmenu
{
background: #000000 url(images/apps/top_menu1.gif) center center repeat-x;
border: 1px solid #595959;
border-width: 1px 1px;
float: left;
font: bold 12px arial, tahoma, verdana, helvetica, sans-serif, serif;
margin: 0em;
overflow: hidden;
padding: 0px;
width: 100%;
}
.solidblockmenu li
{
display: inline;
}
.solidblockmenu li a
{
border-center: 1px solid #FFFFFF;
color: #FFFFFF;
float: left;
margin: 1px;
padding: 7px 10px;
text-align: center;
text-decoration: none;
}
.solidblockmenu li a:hover, .solidblockmenu li .current
{
background: transparent url(images/apps/top_menu2.gif) center center repeat-x;
color: #FFFFFF;
}
.solidblockmenu li a:visited
{
color: #FFFFFF;
}
Ya same question how do you center the menu in an image or table?
Has anyone had any problems getting this to work in Firefox on a Mac?
Hi
Do you know maby how i can one of li list in this menu create in fiferent colour?
i would like forexample that gallery meny was green always.
sorry my english is not very well
Do you know maby how i can one of li list in this menu create in fiferent colour?
i would like forexample that gallery meny was green always.
sorry my english is not very well
i am trying 2 use this css menu code.... but it doesn't align properly .. i am trying to make it to fit the table height but it doesn't work
nice menu. but i need it to support dropdown menu as well using css. please tell me simplest css tweak to make it work with submenus. no css experience
Commenting is not available in this weblog entry.







<style type="text/css">
/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */
.solidblockmenu li{
display: inline;
}
.solidblockmenu li a{
float: left;
color: white;
padding: 9px 11px;
text-decoration: none;
border-right: 1px solid white;
}
.solidblockmenu li a:visited{
color: white;
}
.solidblockmenu li a:hover, .solidblockmenu li .current{
color: white;
background: transparent url(http://www.dynamicdrive.com/cssexamples/media/blockactive.gif) center center repeat-x;
}
.solidblockmenu{
margin: 0;
padding: 0;
float: left;
font: bold 13px Arial;
width: 100%;
border: 1px solid #625e00;
border-width: 1px 0;
background: black url(http://www.dynamicdrive.com/cssexamples/media/blockdefault.gif) center center repeat-x;
list-style: none;
}
</style>
<!--[if IE]>
<style type="text/css">
p.iepara{ /*Conditional CSS- For IE (inc IE7), create 1em spacing between menu and paragraph that follows*/
padding-top: 1em;
}
</style>
<![endif]-->