One of the central concepts of the tab menu is to conserve on bandwidth, code, and download times by using the same two images as background for the text of each link.
If you must forgo these efficiencies, here is where the image rollover behavior is set, in the styling (from Step 1):
Code:
#ddimagetabs a{
display: block;
text-decoration: none;
font: bold 12px Arial; /*tab font */
color: black; /*font color */
width: 86px; /*width of tab image */
height: 22px; /*height of tab image */
float: left;
display: inline;
margin-left: 4px; /*spacing between tabs */
padding-top: 4px; /*vertical offset of tab text from top of tab*/
background-image:url(bluetab.jpg); /*URL to tab image */
background-repeat: no-repeat;
text-align: center;
}
#ddimagetabs a:hover, #ddimagetabs a.current{
background-image:url(bluetabover.jpg); /*URL to tab image onmouseover */
color: black;
}
To individualize the rollovers, each anchor link could be given a unique id (from Step 2):
Code:
<div id="ddimagetabs">
<a id="link1" href="http://url/" onMouseover="expandcontent('sc1', this)">Home</a> <a id="link2" href="http://url/" onMouseover="expandcontent('sc2', this)">New</a> <a id="link3" href="http://url/" onMouseover="expandcontent('sc3', this)">Revised</a><a id="link4" href="http://url/" onMouseover="expandcontent('sc4', this)">Submit</a>
</div>
You would then remove the background-image declarations (and only the background-image declarations) from the Step 1 style and create new ones for each link:
Code:
#ddimagetabs a#link1 {
background-image:url('/images/locate-off.gif');
}
#ddimagetabs a#link2 {
background-image:url('/images/buy-off.gif');
}
#ddimagetabs a#link3 {
background-image:url('/images/sell-off.gif');
}
#ddimagetabs a#link4 {
background-image:url('/images/myaccount-off.gif');
}
#ddimagetabs a#link1:hover, #ddimagetabs a#link1.current {
background-image:url('/images/locate-on.gif');
}
#ddimagetabs a#link2:hover, #ddimagetabs a#link2.current {
background-image:url('/images/buy-on.gif');
}
#ddimagetabs a#link3:hover, #ddimagetabs a#link3.current {
background-image:url('/images/sell-on.gif');
}
#ddimagetabs a#link4:hover, #ddimagetabs a#link4.current {
background-image:url('/images/myaccount-on.gif');
}
Since you would not be using any text, you should place a entity in each link's text area (example for one link):
HTML Code:
<a id="link1" href="http://url/" onMouseover="expandcontent('sc1', this)"> </a>
Bookmarks