Posted by David Dorward on 05/29/05 04:12
dmcconkey@yahoo.com wrote:
> I suppose that's what I was asking to begin with. What's a practical
> example of CSS tables in HTML? Examples given above were 1) for markup
> languages lacking tabular elements, or 2) to emulate a tabular look for
> non-tabular data.
Oh, and I've just remembered a third reason.
If the layout of tables is defined with CSS, then you can style a data table
so it doesn't look like a table. Thus you might have a table such as:
<table>
<tr> <td> <img> </td> <td> caption </td> </tr>
<tr> <td> <img> </td> <td> caption </td> </tr>
<tr> <td> <img> </td> <td> caption </td> </tr>
</table>
And then style it:
tr {
display: inline-block;
border: solid black 1px;
padding: 1ex;
margin: 1ex;
}
td {
display: block;
}
To have a number of images, each with a caption below, arranged side by side
and flowing onto new lines as needed.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
[Back to original message]
|