View Full Version : tabbed oontent tabs

07-03-2007, 05:48 PM
1) Tab Content Script

2) http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm

3) Hi there... I have a quick question regarding your 'Tab Content Script' Basically I need to display an image instead of relying on the .CSS to stylise the tabs... is this possible? BTW...thanks for a great script!


07-03-2007, 08:02 PM
Do you mean replace the current list based structure with image tabs instead? You should be able to do this by first adding image tags inside each <li> element:

<ul id="maintab2" class="shadetabs">
<li class="selected"><a href="#" rel="tcontent1"><img src="1.gif" /></a></li>
<li><a href="#" rel="tcontent2"><img src="2.gif" /></a></li>
<li><a href="#" rel="tcontent3"><img src="3.gif" /></a></li>
<li><a href="#" rel="tcontent4"><img src="4.gif" /></a></li>

Then, inside tabcontent.css, remove any rules that target the A element. In other words, remove the below chunk from the file:

.shadetabs li a{
text-decoration: none;
padding: 3px 7px;
margin-right: 3px;
border: 1px solid #778;
color: #2d2b2b;
background: white url(shade.gif) top left repeat-x;

.shadetabs li a:visited{
color: #2d2b2b;

.shadetabs li a:hover{
text-decoration: underline;
color: #2d2b2b;

.shadetabs li.selected{
position: relative;
top: 1px;

.shadetabs li.selected a{ /*selected main tab style */
background-image: url(shadeactive.gif);
border-bottom-color: white;

.shadetabs li.selected a:hover{ /*selected main tab style */
text-decoration: none;

07-09-2007, 11:57 AM
I have a problem with this script.
It works only with FF2.
IE and Opera opens the tab links directly, not in the contentarea div.