开发者

Change table information on mouseover?

I know this is similar to my other question but I made it too hard to understand so I have made this one

I have two tabs:

"Search" and "Tags"

"Search" is the default tab so I have a rounded edge box in the table behind the text BUT not as a background

I want this rounded edge box to be behind the 'Tags' tab when i put the mouse over 'Tags'

How do I do this?

HTML:

<table height="20" width="30" cellpadding="0" cellspacing="0">
<tr>
<td>

<div class="roundedcornr_box_407494">
<div class="roundedcornr_top_407494"><div></div></div>
   <div class="roundedcornr_content_407494">
      <font color="#ffffff" size="2" face="helvetica">
 Search
</font>  
  </div>
<div class="roundedcornr_bottom_407494"><div></div></div>
</div>

</td>
</tr>
</table>

</td>
<td>
<div style="margin-left:10px;" />
<center>
<table height="20" width="30" cellpadding="0" cellspacing="0" >
<tr>
<td>
<center>
<div class="roundedcornr_box_235759">
<div class="roundedcornr_top_235759"><div></div></div>
   <div class="roundedcornr_content_235759"> 
<font color="#585858" size="2" face="helvetica">
 Tags
</font>      </div>
    <div class="roundedcornr_bottom_235759"><div></div></div>
</div>
</center>
</td>
  </tr>
  </table>

CSS:

.roundedcornr_box_407494 {
background: #bdbdbd;
}
.roundedcornr_top_407494 div {
background: url(roundedcornr_407494_tl.png) no-repeat top left;
}
.roundedcornr_top_407494 {
background: url(roundedcornr_407494_tr.png) no-repeat top right;
}
.roundedcornr_bottom_407494 div {
background: url(roundedcornr_407494_bl.png) no-repeat bottom left;
}
.roundedcornr_bottom_407494 {
background: url(roundedcornr_407494_br.png) no-repeat bottom right;
}

.roundedcornr_top_407494 div, .roundedcornr_top_407494, 
.roundedcornr_bottom_407494 div, .roundedcornr_bottom_407494 {
width: 100%;
height: 5px;
font-size: 1px;
 }
.roundedcornr_content_407开发者_如何学C494 { margin: 0 5px; }

Thanks!

James


You can give your tab div an ID, and then when mouseover change its class to the same as Seach, and then back on mouse out.

You should try and put all your styling in the CSS, as you have center and font tags in the mix. Also, alot of new browsers offer rounded corner support for css3, maybe not a fix for you but just wanted to point that out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜