You are here: Re: Why CSS tables? « HTML « IT news, forums, messages
Re: Why CSS tables?

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация