HTML Table Query

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I am trying to create a table that will highlight the row (and if
possible even column) when I mouse over it. An example is shown in the
IBM link below (Table 1). Can anyone point me in the right direction ?
Looking at the source I think its a css class file but I dont know
what to check for next as the html file has soooo many css files
included ! /

Thanks in advance,

Re: HTML Table Query

Kevin wrote:
Quoted text here. Click to load it

Row is easy:

<TR BGCOLOR=White onMouseOver="this.bgColor='#C0FFC0'"

The column is much harder, because it doesn't really exist as an entity,
it is really just a collection of cells.

Steve Swift

Re: HTML Table Query

Kevin wrote:

Quoted text here. Click to load it

This might be possible in CSS, or using JavaScript, with the usual caveats.
It is not an HTML issue, except in the trivial marginal sense that some HTML
constructs, such as class and id and onmouseover and onmouseout attributes
may help to make a row or a column manipulatable in CSS or JavaScript.

Please note that the topic of this group is HTML authoring for the WWW.


Re: HTML Table Query

Quoted text here. Click to load it

[X-posted and follow-ups to CIWAS]

Since this is a CSS issue, this is better discussed in CIWAS.

A simple way to do this with CSS is to add to your style sheet a
declaration of :

background: #dadada;
color: #000000

(change colors to suit)

If necessary, add a class if you want this behavior on only some table

This works in Firefox and in IE version 8, but not for earlier version
of IE.

Because of poor support in older browsers, either ensure that this is
not required behavior for the page to work.


Nick Theodorakis
contact form:

Site Timeline