rhian
02-09-2008, 12:11 AM
1) Script Title:
DD TAB MENU
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm
3) Describe problem:
Can somebody please tell me how I can go about centering the tabs in this nice script. By default they are left aligned. I have pasted the CSS file from the script below. It's example 4 on the Dynamic Drive web page link above. Thanks!
.ddcolortabs{
padding: 0;
width: 100%;
background: transparent;
voice-family: "\"}\"";
voice-family: inherit;
}
.ddcolortabs ul{
font: normal 11px Arial, Verdana, sans-serif;
margin:0;
padding:0;
list-style:none;
}
.ddcolortabs li{
display:inline;
margin:0 2px 0 0;
padding:0;
text-transform:uppercase;
}
.ddcolortabs a{
float:left;
color: white;
background: #678b3f url(media/color_tabs_left.gif) no-repeat left top;
margin:0 2px 0 0;
padding:0 0 1px 3px;
text-decoration:none;
letter-spacing: 1px;
}
.ddcolortabs a span{
float:left;
display:block;
background: transparent url(media/color_tabs_right.gif) no-repeat right top;
padding: 6px 8px 3px 7px;
}
.ddcolortabs a span{
float:none;
}
.ddcolortabs a:hover{
background-color: #8cb85c;
}
.ddcolortabs a:hover span{
background-color: #8cb85c;
}
.ddcolortabs a.current, #ddcolortabs a.current span{ /*currently selected tab*/
background-color: #8cb85c;
}
.ddcolortabsline{
clear: both;
padding: 0;
width: 100%;
height: 8px;
line-height: 8px;
background: #678b3f;
border-top: 1px solid #fff; /*Remove this to remove border between bar and tabs*/
}
.tabcontainer{
clear: left;
width:95%; /*width of 2nd level sub menus*/
height:1.5em; /*height of 2nd level sub menus. Set to largest's sub menu's height to avoid jittering.*/
}
.tabcontent{
display:none;
}
DD TAB MENU
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm
3) Describe problem:
Can somebody please tell me how I can go about centering the tabs in this nice script. By default they are left aligned. I have pasted the CSS file from the script below. It's example 4 on the Dynamic Drive web page link above. Thanks!
.ddcolortabs{
padding: 0;
width: 100%;
background: transparent;
voice-family: "\"}\"";
voice-family: inherit;
}
.ddcolortabs ul{
font: normal 11px Arial, Verdana, sans-serif;
margin:0;
padding:0;
list-style:none;
}
.ddcolortabs li{
display:inline;
margin:0 2px 0 0;
padding:0;
text-transform:uppercase;
}
.ddcolortabs a{
float:left;
color: white;
background: #678b3f url(media/color_tabs_left.gif) no-repeat left top;
margin:0 2px 0 0;
padding:0 0 1px 3px;
text-decoration:none;
letter-spacing: 1px;
}
.ddcolortabs a span{
float:left;
display:block;
background: transparent url(media/color_tabs_right.gif) no-repeat right top;
padding: 6px 8px 3px 7px;
}
.ddcolortabs a span{
float:none;
}
.ddcolortabs a:hover{
background-color: #8cb85c;
}
.ddcolortabs a:hover span{
background-color: #8cb85c;
}
.ddcolortabs a.current, #ddcolortabs a.current span{ /*currently selected tab*/
background-color: #8cb85c;
}
.ddcolortabsline{
clear: both;
padding: 0;
width: 100%;
height: 8px;
line-height: 8px;
background: #678b3f;
border-top: 1px solid #fff; /*Remove this to remove border between bar and tabs*/
}
.tabcontainer{
clear: left;
width:95%; /*width of 2nd level sub menus*/
height:1.5em; /*height of 2nd level sub menus. Set to largest's sub menu's height to avoid jittering.*/
}
.tabcontent{
display:none;
}