我应该回到HTML而不是CSS的表格吗? [英] should I go back to tables in HTML instead of CSS?

查看:59
本文介绍了我应该回到HTML而不是CSS的表格吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Brian O''Connor(ironcorona)对其他帖子的跟进中,他重复了

的想法,即在CSS中使用表格不是应该做的事情

因为IE不支持它。当然,我不满意IE不支持CSS表的事实。但是人们可以做些什么呢?

在某些情况下需要一种或另一种类型的表格(无论是否某些人觉得它是否适当的b $ b) 。所以我现在考虑的问题是现在考虑支持一步并保留在

HTML(例如TABLE / TR / TD / etc元素)中的表格,直到微软得到更好的行为,或者Firefox在Windows用户上取得更大的进展。


如果没有人能给出一个很好的理由,我''我会把这个改变回来。


注意,这不适用于有人可以证明不需要的东西

table。
< br $> b $ b -

--------------------------------- --------------------------------------------

| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |

| (名字)在ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |

--------- -------------------------------------------------- ------------------

In followups by Brian O''Connor (ironcorona) to other posts, he repeats
the idea that using tables in CSS is not something that should be done
because IE doesn''t support it. Of course I''m not happy about the fact
that IE doesn''t support CSS tables. But what can one do about that?
And tables of one type or the other are needed in some cases (regardless
of whether some people feel it is appropriate or not). So the issue I
and considering right now is to back up one step and stay with tables in
HTML (e.g. TABLE/TR/TD/etc elements) for now, until either Microsoft gets
its act together better, or Firefox makes more inroads on Windows users.

If no one can give a good reason not to, I''ll make that change back.

Note, this is not applicable to things that someone can prove do not need
tables.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------

推荐答案

2006年5月10日18:31:29 GMT, ph ************** @ ipal.net 写道:
On 10 May 2006 18:31:29 GMT, ph**************@ipal.net wrote:
当然,我不满意IE不支持CSS表的事实。


IE支持它们,但仅限于< table>元素(并且我认为

在XML上完全由XML呈现)。


OTOH,几乎所有关于误用的错误<表>

同样适用于< foo>由CSS设计成

表的元素。


没有_need_样式< foo> (或至少< html:div>或

< html:span>)通过使用CSS成为表格式。如果确实这样做了

,那么只需使用< table>首先。只有CSS表行为

出现解决XML问题,而不是解决HTML无问题。

所以我现在正在考虑的问题是现在备份一步并继续使用HTML格式的表格(例如TABLE / TR / TD / etc元素),直到微软更好地采取行动,或者Firefox在Windows用户上取得更多进展。
Of course I''m not happy about the fact
that IE doesn''t support CSS tables.
IE does support them, but only on the <table> element (and also I think
on XML, when rendered purely by XML).

OTOH, pretty much everything that''s wrong about mis-using <table> is
just as bad when applied to a <foo> element that''s being styled into a
table by CSS.

There is no _need_ to style <foo> (or at least <html:div> or
<html:span>) into being table-like by using CSS. If it''s right to do
that, just use the <table> in the first place. CSS table behaviour only
arose to solve an XML problem, not to solve a HTML non-problem.
So the issue I
and considering right now is to back up one step and stay with tables in
HTML (e.g. TABLE/TR/TD/etc elements) for now, until either Microsoft gets
its act together better, or Firefox makes more inroads on Windows users.




使用< table>当一张桌子是正确的用法时。否则不要。



Use a <table> when a table is the right thing to use. Otherwise don''t.


2006年5月10日星期三22:47:44 +0100 Andy Dingley< di ***** @ codesmiths.com>写道:

| 2006年5月10日格林威治标准时间18:31:29, ph ********** **** @ ipal.net 写道:

|

|>当然我对这个事实并不满意

|> IE不支持CSS表格。

|

| IE确实支持它们,但仅限于< table>元素(并且我认为

|在XML上,当完全由XML呈现时)。

|

| OTOH,几乎所有关于误用的错误< table>是

|同样适用于< foo> '被设计为

|的元素CSS表格。


这个问题在过去一直存在争议。有人说不要使用

表。其他人说在CSS中使用表格是可以的,因为它是

表示,而HTML中的表格是内容(标记)。


按下来显示我做了一些事情是如何使用表格来完成

没有桌子的方式,有些东西有效,有些没有(通常

当他们尝试时,那里是一些其他不受欢迎的影响,我没有提到要求......所以他们的努力至少是真实的。


总而言之,一些事情只需要表格,无论是否是人们的'b $ b查看应该使用哪些表格。

|样式没有_need_< foo> (或至少< html:div>或

|< html:span>)通过使用CSS成为表格式。如果它是正确的

|那,只需使用< table>首先。仅限CSS表行为

|出现解决XML问题,而不是解决HTML无问题。


也许那些告诉我使用CSS表而不是HTML表的人

将介入这里。我不是那个捍卫转换到CSS表的人。


我发现在所有情况下都不可能使HTML文件变得纯净

内容和语义。在某些情况下,这是可能的。但是

这些都是信息性文件(比如关于

某些程序的帮助页面)。当谈到制作一个非常布局的网站时,可能是高度图形化的,有些东西真的不是b / b
内容只需要在HTML中在

网站页面上获得所需的结果。

|>所以问题我

|>并且现在正考虑回来向上迈出一步,暂时停留在

|> HTML(例如TABLE / TR / TD / etc等元素)中的表格,直到Microsoft获得

|>更好地共同行动,或者Firefox在Windows用户上取得更多进展。

|

|使用< table>当一张桌子是正确的用法时。否则不要。


但是谁来决定?以及如何决定?我知道桌子做了什么,而我当前的方法决定的是,如果我需要桌子做什么,我会用它。并且

我不介意用HTML代替CSS,因为这就是我多年来一直在做的事情。/ b $ b已经好多年了否则可以在表格中完成

,例如阴影效果。请参阅 http://linuxhomepage.com/ (直到我重做它

在几天或几周或每当)看到过多使用表格。我的

目标是让用户在某种程度上定制样式(例如皮肤)

。我想确保提供足够的HTML,以便在CSS中轻松完成

。阴影可能是3个DIV,可以根据需要定制
。我希望表格至少只需要
一排N列。


-

---- -------------------------------------------------- -----------------------

| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |

| (名字)在ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |

--------- -------------------------------------------------- ------------------
On Wed, 10 May 2006 22:47:44 +0100 Andy Dingley <di*****@codesmiths.com> wrote:
| On 10 May 2006 18:31:29 GMT, ph**************@ipal.net wrote:
|
|>Of course I''m not happy about the fact
|>that IE doesn''t support CSS tables.
|
| IE does support them, but only on the <table> element (and also I think
| on XML, when rendered purely by XML).
|
| OTOH, pretty much everything that''s wrong about mis-using <table> is
| just as bad when applied to a <foo> element that''s being styled into a
| table by CSS.

This has been debated in the past. There are people that say not to use
tables. Other say it''s OK when using tables in CSS because then it is
presentation, whereas tables in HTML is content (marked up).

When pressed to show how some thing I did use tables for could be done
in ways without tables, some things worked, and some did not (usually
when they tried, there was some other undesired effect that I had not
mentioned as a requirement ... so their efforts were at least genuine).

All in all, some things just need tables, whether or not that is people''s
view of what tables should be used for.
| There is no _need_ to style <foo> (or at least <html:div> or
| <html:span>) into being table-like by using CSS. If it''s right to do
| that, just use the <table> in the first place. CSS table behaviour only
| arose to solve an XML problem, not to solve a HTML non-problem.

Maybe the people that tell me to use CSS tables instead of HTML tables
will step in here. I''m not the one to defend switching to CSS tables.

I''ve found it is not possible in all cases to make the HTML file be pure
content and semantics. There are some cases where that is possible. But
those are in things like informational documents (like a help page about
some program). When it comes to making a web site that is very layout
oriented, and likely highly graphical, some things that really are not
content just have to be in the HTML to get the desired results on the
site page.
|>So the issue I
|>and considering right now is to back up one step and stay with tables in
|>HTML (e.g. TABLE/TR/TD/etc elements) for now, until either Microsoft gets
|>its act together better, or Firefox makes more inroads on Windows users.
|
| Use a <table> when a table is the right thing to use. Otherwise don''t.

But who''s to decide? And how to decide? I know what a table does, and my
current method to decide is if I need what a table does, I''ll use it. And
I don''t mind doing it in HTML instead of CSS as that''s what I''ve been doing
for years already, though for many things that can otherwise done in tables
such as the shadow effect. See http://linuxhomepage.com/ (until I redo it
in a few days or weeks or whenever) to see an excess usage of tables. My
objective is to let users customize the style (e.g. skins) to some extent
in the future. I want to make sure I provide sufficient HTML to let that
be easy enough to do in CSS. The drop shadows will likely be 3 DIVs that
can be customized as desired. I hope tables will be at a minimum of just
1 row of N columns.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------


ph ************** @ ipal.net 写道:
ph**************@ipal.net wrote:
周三,2006年5月10日22:47:44 +0100 Andy Dingley< di ***** @ codesmiths.com>写道:
|使用< table>当一张桌子是正确的用法时。否则不要。

但是谁来决定呢?


你,作者

如何决定?


我想,Steve Pugh总结得很好(记住这个交叉点

的东西)。

我知道什么是表是的,我当前的方法来判断我是否需要桌子做什么,我会用它。
On Wed, 10 May 2006 22:47:44 +0100 Andy Dingley <di*****@codesmiths.com> wrote:
| Use a <table> when a table is the right thing to use. Otherwise don''t.

But who''s to decide?
You, the author
And how to decide?
I think, Steve Pugh summed it up quite well (remember this intersection
thing).
I know what a table does, and my
current method to decide is if I need what a table does, I''ll use it.




你的意思是''是的吗? ''仅限默认演示文稿?然后,当你需要左边距时,你还需要使用blockquote吗?


-

Johannes Koch

in te domine speravi;非永久性的东西。

(Te Deum,4美分。)



Do you mean ''does'' only in terms of default presentation? Then do you
also use blockquote when you need a left margin?

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


这篇关于我应该回到HTML而不是CSS的表格吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆