You are here: Re: Tables with DIV « HTML « IT news, forums, messages
Re: Tables with DIV

Posted by richard on 10/04/15 12:01

On Sat, 26 Jan 2008 12:58:08 +0100, Knut Krueger
<knut.krueger@usa.com> wrote:

>Hi to all,
>There is an short example in the German selfhtml.og pages:
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
><html><head><title>display</title>
><style type="text/css">
>div.table { display:table; border-collapse:collapse; }
>div.tr { display:table-row; }
>div.td { display:table-cell; border:thin solid red; padding:5px; }
></style>
></head><body>
>
><div class="table">
> <div class="tr">
> <div class="td">ich</div>
> <div class="td">bin</div>
> <div class="td">eine</div>
> <div class="td">Tabelle</div>
> </div>
></div>
>
></body></html>
>
>It is working fine with Firefox and Opera, but not with IE.
>The are cells are horizontal ordered, in IE they are vertical ordered.
>
>Does anybody know why?
>
>Rgegards Knut

First, think of a division as a table cell.
You can not mix the two as you are attempting to do.
It is one or the other, not both.
Then you are using tag names as class identifiers.

Perhaps you should try something like this:

<div class="box1">
<div class="row">
<div class="cell">Ich</div>
<div class="cell">bin</div>
<div class="cell">nicht</div>
</div>
</div>

In your css, define the characteristics for each division as desired.
if you want "cell" side by side, float them.
..cell {float:left;}
..row {clear:left;}
Then it will look like a table.

 

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

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