Why doesn't this work?

This works fine on table1891header and gives a table without any cells showing

.table1891header tr,th,td {
border:0 solid #000;

Why then does this not work on table1841header

.table1841header,td,tr,th{ border-collapse:collapse;
border:0 solid #000;
border-bottom-color #708090

See http://www.c5d.co.uk/qrmb1911.20.php at the bottom of the page

.table1891header tr,th,td is not the same as .table1841header,td,tr,th.

The first targets those tr whose parent has a class of table1891header, plus any th or td.

The second targets any item with a class of table1841header, and any td, tr or th.

Punctuation matters.


Thanks very much.

I know that punctuation matters. I just couldn’t spot it having looked at it for an hour or so!

1 Like

I know that feeling.

Please notice the date and substance of this post.

Problem with a table layout

And this one:-

Formatting code with appropriate indents, white-space and new-lines may seem like work, but it can save you time in the long run in making sense of the code.


Sam, I have been doing these transcriptions for some ten years now ! In fact probably longer and over the time I have amassed various different styles for the numerous tables.

Census info collected varied from from very little in 1841 to masses in 1911 and so the tables have columns ranging from six to 18.

I am now slowly trying to rationalise all the various CSS styles. into one. There are numerous items duplicated. ie classes which different names but each doing exactly the same. There are tables with classes and other with IDs It because of the timescale of the construction of the site which has led to this complications.

However with this forum I wouldn’t have got as far as I have.

If I had known at the start what I know, it may have been better to wait and do everything all at once. But hindsight is great and I am where I am.

What I atrying to do is code everything so that it’s all the same. All the CSS for the table is together, all the CSS for the text is together and all the CSS for the pae background , basic fonts etc is all togther.

If you look at www.c5d.co.uk/testcss.css you’ll what I mean

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.