Hello everyone. I’m new, so please pardon any missteps.
I’m pretty good with html and css – but without bells and whistles. No flash, for example. Right now I’m working with software designed by someone else. It’s called “the next generation” (TNG) of genealogy software, and it is in fact head and shoulders above most other programs out there. But it’s not flawless. Styling and css are especially fraught with problems.
I don’t have time, energy or expertise enough to convert even part of TNG to all css (and I’m not even sure that’s a good idea), but I do want to use the program. Here’s the biggest problem I’ve run into so far (I have read through the faq and best practices here and elsewhere, and also posted on the TNG forum, but got no response). There’s a lot of tabular data in genealogy, no surprise. TNG is developing ways to deal with display of such data at a pretty good rate, but it’s mostly volunteers and you know how that goes. So I needed to set up a table format to display specific information from the 1900 census. I put together a css table and inserted it into a cell of the larger html table where all the data is pulled from the database.
It wasn’t clear to me (and still isn’t) if it’s kosher to put a css table inside an html table, but it seems to work – almost. You can see the problem here if you scroll to the bottom of the page. You’ll see two css tables (rudimentary formatting for the time being). You’ll also note the HUGE amount of space above and below the tables.
I went over the css carefully and I can’t see any reason for these margins (padding?) – but clearly, I’m missing something.
Also, I am aware that the page as a whole doesn’t validate but there isn’t much I can do about that. It may be that the css table just won’t work in this larger matrix of trouble, in which case, I would love to just hear that much. If there’s a simple solution (something to do with relative placement?) I would love to hear that even more.
One last thing: these tables are not all the same size. The one you see on that page is for the 1900 census. Each year is different.
So, there it is. Any advice or direction much appreciated.
Ralph – thank you for the reply. That was dopey of me – you can log in using the login name:
visitor
and the pw:
visitor
Genealogy software is generally pretty messy, I’m afraid. There are individual programs who do a couple things very well, but no one program that has a handle on all the basics. This one is pretty good, in comparison.
If you have any suggestions re my css tables, I would much appreciate your input.
Okay, I see all those breaks, which were generated by the software, I guess. The two css tables are way at the bottom of that cell. I’m going to go look to see if there’s a way to get rid of those breaks.
Ah, I think you are using the wrong term here, but not sure why. What you’ve posted above is an HTML table, not a CSS table. CSS is just about styling content, and there is a CSS option that allows for table-like layout (display: table)—but that’s not really of use here. It’s fine to nest one HTML table inside another, though.
Watch out for the </head> tag here:
</table>
[COLOR="#FF0000"]</head>[/COLOR]
That could really mess up your code. That only belongs just before the <body> tag.
Crickey, did I put an extra end-head code in there? I’m off to look. Thanks for your sharp eyes. And yes, I meant an html table that is handled exclusively by css. No table structure. I’m not sure what else to call it.
I’m not really sure what you mean by that. An HTML table has a table structure. You can instead style divs (or other elements) to arrange themselves like a table with CSS, but it’s not a good idea for what you are doing, as it’s really tabular data, by the look of it.