473,787 Members | 2,857 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I set a different border color for a table row?

How can I set a different border color for a table row?
All I found in the MSDN for <TR> was:
Scripting object.borderCo lor [ = sColor ]
but it doesn't work for <TR> though it works for <TD>. I would like to
change color of the border of the entire row in a response to onMouseover
and onMouseout events.
Any ideas?
Jul 20 '05 #1
2 2359
Paweł Gałecki wrote on 15 feb 2004 in comp.lang.javas cript:
How can I set a different border color for a table row?
All I found in the MSDN for <TR> was:
Scripting object.borderCo lor [ = sColor ]
but it doesn't work for <TR> though it works for <TD>. I would like to change color of the border of the entire row in a response to onMouseover and onMouseout events.


A <tr> has no border, but perhaps this is what you are
looking for:

<script>
function green(x) {x.className="g reen"}
function red(x) {x.className="r ed"}
</script>

<style>
table tr td {font-size:25pt;paddi ng:10px;}
.red td {border:red 5px dotted;}
.green td {border:green 5px dashed;}
</style>

<table>
<tr class="red" onmouseover="gr een(this)" onmouseout="red
(this)">
<td>qwerty uiop</td><td>asdfg hjkl</td></tr>
<tr class="red" onmouseover="gr een(this)" onmouseout="red
(this)">
<td>qwerty uiop</td><td>asdfg hjkl</td></tr>
<tr class="red" onmouseover="gr een(this)" onmouseout="red
(this)">
<td>qwerty uiop</td><td>asdfg hjkl</td></tr>
<tr class="red" onmouseover="gr een(this)" onmouseout="red
(this)">
<td>qwerty uiop</td><td>asdfg hjkl</td></tr>
<tr class="red" onmouseover="gr een(this)" onmouseout="red
(this)">
<td>qwerty uiop</td><td>asdfg hjkl</td></tr>
<tr class="red" onmouseover="gr een(this)" onmouseout="red
(this)">
<td>qwerty uiop</td><td>asdfg hjkl</td></tr>
</table>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #2
On 15 Feb 2004 12:15:58 GMT, Evertjan. wrote:

A <tr> has no border, but perhaps this is what you are
looking for:

Exactly what I needed, thanx a lot ;)
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5013
by: Grytpype-Thynne | last post by:
Is it possible to give a width to a floated div which is greater than the width of the image it contains? What I want to do is display some images which will be of different sizes so that they have their centers vertically aligned, I was thinking of using a fixed width container with one image floated left and one right with the images centered in their respective boxes and then the same down the page. I am using a table to obtain the...
3
2197
by: Horst Rotenholzer | last post by:
Hello, I was creating a table inside a div element that positions the table. However, the table (which is "styled" by CSS) does have a different size in IE6 and N7. Can anyone help me and tell me what´s the reason for this? Thanks, Horst CSS stylesheet:
7
18919
by: Marek Mänd | last post by:
When using <TABLE rules="all"> Mozilla 1.6 and previous versions draw a nasty interiour border, which doesnt go away though I have on TD's css border:none set. Is it something wrong with my stylehseet or is it a bug of mozilla? I am asking this because of IE and Opera work differently here. <style>
0
2735
by: yurps | last post by:
Hello here is my html, if you click the missing image in the first column on the left, the div is shown, when clicked again the div disappears...but the bottom border disappears as well...Is there anyway to stop this...??? <HTML> <HEAD> <title>Conform Inbox</title> <meta content="False" name="vs_snapToGrid">
3
1068
by: ireneatngs | last post by:
Hi, I have example html below which contains a couple of hidden divs. However, some of the table borders within these hidden divs are actually displayed when they should not be. In my example, I have comments indicating that if I remove the 'border-collapse' attribute for two of the tables within the hidden divs, my problem is fixed.
2
5292
by: Jon | last post by:
Hi all, I am trying to create a page that contains a number of div elements, with links on the left side of the page allowing the user to select which div to display. Some of the pages contain tables with border styles used to block off the columns and the headers, but not the individual rows. The pages will be displayed using IE 5.5 and later in the finished app. Now to the problem, which is a little awkward to describe:
3
2232
by: francisco lopez | last post by:
I hope not sent I twice. ok here is my problem, the javascript form validation works perfect during I put a emaildirection in the <form action:""> comand, like this: <form action="mailto:butacasalada@gmx.net" method="post" name="formulario" id="formulario" onSubmit="return chkFormular()">
2
1463
by: ameshkin | last post by:
I'm having all kinds of visual problems using dreamweaver's built in query builder. I have 4 different categories. Right. I want to show ten records from each category of items in a mysql database. All on the same page. Could someone tell me what is wrong with my code? The page is here http://www.picmonkey.com/MoreGraphics.php
5
5701
by: Simon Benson | last post by:
Probably a fairly simple problem but one that's been plaguing me for a couple of days... can anyone help? I have a classic ASP page with a number of text boxes which are updatable. For convenience I want to add 'tabs' at the top of the page (like a card index) as the data to be displayed is split into specific groups (client, company, preferences, events). How do I update any changes to the data and switch to a different page - at
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10169
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.