Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > TD border color on mouseover

Reply
Thread Tools

TD border color on mouseover

 
 
Carl Gilbert
Guest
Posts: n/a
 
      07-18-2005
Hi

I wish to change the color of a cell border when the mouse passes over the
cell.

The code I currently have for the cell is as follows:
<TD height="76" width="328" style="border-color: black; border-style:
solid; border-width: 4;"> </TD>

I am using ASP.NET and VB.NET if that makes thing easier and I would prefer
not to use CSS.

Can anyone suggest a method to change the border color?

Regards, Carl Gilbert


 
Reply With Quote
 
 
 
 
Adrienne
Guest
Posts: n/a
 
      07-18-2005
Gazing into my crystal ball I observed "Carl Gilbert"
<(E-Mail Removed)> writing in
news:QrVCe.2990$(E-Mail Removed):

> Hi
>
> I wish to change the color of a cell border when the mouse passes over
> the cell.
>
> The code I currently have for the cell is as follows:
> <TD height="76" width="328" style="border-color: black;
> border-style:
> solid; border-width: 4;"> </TD>
>
> I am using ASP.NET and VB.NET if that makes thing easier and I would
> prefer not to use CSS.
>
> Can anyone suggest a method to change the border color?
>
> Regards, Carl Gilbert
>
>
>


ASP and ASP.Net know nothing of a mouse passing over anything. That's
client side, and for IE, which only honors hover on the A element, you
would have to use javascript to accomplish this.

What to do you have against CSS? CSS makes things _much_ easier, for
example:

<% while not rs.EOF
c = c + 1
if mod c 2 = 0 then
trcolor = colora
else
trcolor = colorb
end if
%>
<tr class="<%=trcolor%>">
<td>data</td>
</tr>
<% rs.Movenext
wend
rs.Close
set rs = nothing
%>

Now colora and colorb could be defined in an external stylesheet:
..colora {background-color:#000; color:#fff;}
..colorb {background-color:#fff; color:#000;}

If you decide to change the colors or attributes of that class later, it's
only a matter of changing the stylesheet, not the document.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Show border around datagrid row on mouseover? Anthony Jones ASP .Net 0 02-17-2009 01:14 PM
Disabling <object> border highlight on mouseover in IE kaston3 HTML 1 02-19-2008 10:56 AM
rounded corners in which my border color is different than the background color laredotornado@zipmail.com Javascript 1 02-14-2007 07:37 AM
border-color: #003366; border-width: 2px; =?UTF-8?B?TWFydGluIFDDtnBwaW5n?= HTML 64 07-30-2006 04:01 PM
Datagrid Border showing when I say no border tshad ASP .Net 0 01-31-2005 05:40 PM



Advertisments