Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HREF Table Cells with Highlights 1

Status
Not open for further replies.

itflash

Programmer
Jul 18, 2001
535
GB

Hi all

Hope you can help, driving me nuts. [morning]

Got probably a basic question.

If you copy the following into your editor you'll see what I mean.

I have two examples of mouse effects with href in table cells.

The first row works in both netscape and IE.

The second only in IE.

The second is the effect I want as it fills the whole table height whilst the first does not.

How can I get the second row to work for Netscape, IE and other popular browsers?

Many Thanks In Advance.!!!
ITflash


<style type=&quot;text/css&quot;>
<!--
.myClass
{font-family: Verdana; font-size: 8pt; color:#FFFFFF}
.myClass
a{
color:white;
text-decoration:none;
position:relative;
display:block;
}
.myClass a:hover{
color:white;
background-color:#008080;
}

-->
</style>

<table border=&quot;1&quot; bgcolor=&quot;#993300&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse: collapse&quot; width=&quot;100%&quot; height=&quot;35&quot; bordercolor=&quot;#FFFFFF&quot;>
<tr>
<td height=&quot;30&quot; align=&quot;center&quot; class=&quot;myClass&quot;>
<a href=&quot;#&quot; onclick=&quot;location.href='services.htm';return false&quot;>The Company</a></td>
</tr>
<TR>
<a href=&quot;#&quot; onclick=&quot;location.href='services.htm';return false&quot;>
<TD height=&quot;30&quot; width=&quot;10%&quot; STYLE=&quot;border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF; border-bottom:1px solid #FFFFFF; cursor: hand; border-right-color:#FFFFFF&quot; onmouseover=&quot;style.backgroundColor='#008080'&quot; onmouseout=&quot;style.backgroundColor='#993300'&quot; align=&quot;center&quot; height=&quot;2&quot;>
The Company
</TD>
</a>
</TR>
</table>
 
Code:
<style type=&quot;text/css&quot;>
<!--
.normal{
font-family: Verdana;
font-size: 8pt;
color:white;
background-color:#993300;
text-decoration:none;
border:1px solid #FFFFFF;
}
.highlight{
font-family: Verdana;
font-size: 8pt;
color:white;
background-color:#008080;
text-decoration:underline;
cursor: hand;
border:1px solid #FFFFFF;
}

-->
</style>

<table border=&quot;1&quot; 
       cellpadding=&quot;0&quot; 
       cellspacing=&quot;0&quot; 
       style=&quot;border-collapse: collapse&quot; 
       width=&quot;100%&quot; 
       bordercolor=&quot;#FFFFFF&quot;>
 <tr>
  <td height=&quot;30&quot; 
      align=&quot;center&quot; 
      class=&quot;normal&quot; 
      onmouseover=&quot;this.className='highlight';&quot; 
      onmouseout=&quot;this.className='normal';&quot; 
      onclick=&quot;location.href='services.htm';return false&quot;>
   The Company
  </td>
 </tr>
 <tr>
</table>

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top