Forum Moderators: not2easy
I am looking for an example where css and tables are used together. I have to update a webpage whose template uses tables for the layout of the page.
I cant make any changes to the template i can only add content to the body of the template.
The content i would like to add will come from a database and its tabular data so to make it easy i would like to use tables to display the data.
I dont want to use tables to layout the data. Is it possible to use css/div tags to position the html table wherever i want on the screen?
The final page will contain four boxes. one for a form. A box just below it will contain the tabular data and a box on the right will also contain data.
What i would like is an example of how div tags have been used to position tables that contain data.
thanks
You have some unique properties that youcan apply on tables to render them.
"border-collapse:collapse" simplifies the borders a lot.
"empty-cells:show" makes empty cells show up in a table.
If different cells in a table have different borders, in a collapsed model there is a resolution algorithm to choose the right one. It's important to note "border-style:hidden" has priority over the other border style, a "detail" IE implements incorrectly.
Should nth-child and similar pseudo classes be supported, you could do nice odd/even alternating background colors.
More info, examples and drawings:
[w3.org...]
Tip: skip over section 17.2 in a first reading, it'll confuse you (deal with applying table layout to things that are not a table, not what you seek anyway).
Anyway thanks guys for your help. I've been experimenting a bit. See below [webmasterworld.com...]
Thanks