PDA

View Full Version : Background Imabe behind css tabs



carlf
Mar 28th, 2009, 01:45 AM
Hi

Im using some code from dynamicdrive to add tabbed navingation to my website.

I am trying to add an image behind the tabs... unsuccessfuly :(

The css code from dynamicdrive:


<style type="text/css">

/*Credits: Dynamic Drive CSS Library */
/*URL: http://www.dynamicdrive.com/style/ */

#ddcolortabs{
margin-left: 4px;
padding: 0;
width: 100%;
background: transparent;
voice-family: "\"}\"";
voice-family: inherit;
padding-left: 5px;
}

#ddcolortabs ul{
font: bold 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:4px 9px 2px 6px;
}

#ddcolortabs a span{
float:none;
}


#ddcolortabs a:hover{
background-color: #8cb85c;
}

#ddcolortabs a:hover span{
background-color: #8cb85c;
}

#ddcolortabs #current a, #ddcolortabs #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*/
}

</style>

I changed:



#ddcolortabs{
margin-left: 4px;
padding: 0;
width: 100%;
background: transparent;
voice-family: "\"}\"";
voice-family: inherit;
padding-left: 5px;
}

to



#ddcolortabs{
margin-left: 4px;
padding: 0;
width: 100%;
background: url(../images/site_header.gif);
voice-family: "\"}\"";
voice-family: inherit;
padding-left: 5px;
}

But the image does not appear.

Im not sure where im going wrong.

Your input is appreciated.

Many thanks
Carl

- edit: code from: http://www.dynamicdrive.com/style/csslibrary/item/dd-color-tabs/

abduraooft
Mar 28th, 2009, 09:18 AM
But the image does not appear.

Im not sure where im going wrong.

Your input is appreciated. Could you post a link to your page?

Excavator
Mar 28th, 2009, 10:01 AM
Hello carlf,
Try this -
#ddcolortabs{
margin-left: 4px;
padding: 0;
width: 100%;
overflow: auto;
background: url(../images/site_header.gif);
padding-left: 5px;
}