td inheriting border-top-width from tr?

by "Lars Huttar" <lars_huttar(at)sil.org>

 Date:  Wed, 7 May 2003 16:28:26 -0500
 To:  <hwg-techniques(at)hwg.org>
  todo: View Thread, Original
Hi all,
I have a problem that's vexing me...

I'm generating a table in HTML using XSLT.
What I want is to have a thicker border between certain rows than
the default.

Because of the nature of the XSLT transformation into HTML, it's really hard
for me to do that by setting styles (e.g. style="border-top-width: 5px")
on all of the td's in a row.  Nor can I give all the td's in that row
a special class, for the same reason.

So I tried setting the style on the <tr>, and hoped it would be
inherited by all the <td>'s within that row:
     <tr style="border-top-width: 5px !important">
       <td style="border-top-width: inherit !important">2</td>
 	... </tr>

However, this doesn't have any effect: the top border of the <td> 
does not appear 5px thick when I view this code in IE 6.0.
(But it does if I put the style directly on the td:
  <td style="border-top-width: 5px">2</td>
)

I have tried the above with and without the "!important", just
in case.  I also tried it without "inherit".
It seems to me that since border widths can be inherited from
<table>s, they should be inheritable from <tr>s... but I know
that some properties can't be inherited, and it does appear (looking
at the MSDN site) that
<tr>s don't have border-width properties of their own; so
does that mean <td>s can't inherit border-width properties from them?

The only solution I can think of would be to stick in some Javascript
to run after loading that would modify the td's in certain rows
to have the desired border width style.  Bleagh.  :-p

Any help would be appreciated.

Lars

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.