Scripsit shah.jigar (AT) gmail (DOT) com:
Quote:
I have the following code |
In future, please post a URL, not a copy of code. Hang around for a week or
so, and you'll see explanations for this.
Quote:
for which I need borders around all the
cells irrespective of their background color or even if they are
empty. There needs to be grids or borders. |
Then use <td> </td> for the empty cells. If however those cells need to
be smaller than what a poor lonesome no-break space needs, use a
single-pixel transparent image. More info:
http://www.cs.tut.fi/~jkorpela/html/emptycells.html Quote:
Somehow this just doesn't
work in Firefox 2.0. |
I'd be more worried about IE, which ignores the empty-cells property.
I can't tell what really happens on Firefox here. Even setting
td { border: solid 1px red!important }
doesn't seem to help, for the empty cells. Neither does it help to use
. But when I remove the CSS code that makes the tbody scrollable, the
borders are there.
I'd say that the idea of creating static headings by making the tbody
scrollable, though feasible in theory, just doesn't work in practice. It
does not work at all on IE, so in terms of WWW authoring, it's not very
useful. You would need to use two tables, one for the headings and one
(wrapped inside a div to please IE) for the data cells and made scrollable.
Then the question is how to make their column widths match becomes crucial,
and the answer is unfortunately that you need to set the widths explicitly.
Quote:
Any suggestions would be helpful. Thanks. I was
trying to create static headers thats why the extra code. |
I won't work that way on IE. By the way, on IE 7, your all rows have 150px
height. Apparently IE recognizes width: 150px for the tbody element but
incorrectly applies it to all _rows_.
Besides, you have headers (<th>) for four columns but only three columns of
data.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/