从表格布局过渡到CSS:我真傻吗? [英] Transition from table layout to CSS: Am I stupid?

查看:68
本文介绍了从表格布局过渡到CSS:我真傻吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我熟悉使用表格进行网页布局。现在我正在做新的页面,而我正在看它,我想,为什么不做正确的

并且只使用CSS和DIV。 br />

有问题的页面是一个简单的柱状布局。我想要完成的是
,所有三列都至少是浏览器窗口的高度

(即使它们的内容更短),如果

任何列的内容都比其他列长,并且超出页面底部的

,我希望更短的列

相应地扩展。就像桌子一样。


嗯,迄今为止的结果是绝对的,完全的灾难。我已经设法创建了一个页面,在四个不同的浏览器上呈现不同的页面,总是错误的,IE甚至都不在其中。


请看这里的页面: http:// www.stoptrick.com/new/index.html


这是一个包含更多解释性文字和一些

浏览器屏幕截图的页面:

http://www.stoptrick.com /csstrouble/index.html


感谢您的任何建议。


- 丹尼尔

Hello,

I''m familiar with using tables for web page layout. Now I''m doing
a new page, and while I''m at it, I thought, why not do it right
and use only CSS and DIVs.

The page in question is a simple columnar layout. What I''d like
to accomplish is that all three columns are at least the height
of the browser window (even if their content is shorter), and if
the content of any column is longer than the others and goes
beyond the bottom of the page, I want the shorter columns to
extend accordingly. Like a table would, too.

Well, the result so far is an absolute, complete disaster. I''ve
managed to create a page that renders differently on four
different browsers, always wrong, and IE isn''t even among them.

Look at the page here: http://www.stoptrick.com/new/index.html.

Here is a page with a bit more explanatory text and some
browser screenshots:

http://www.stoptrick.com/csstrouble/index.html

Thanks for any suggestions.

--Daniel

推荐答案

" Daniel Haude"写道:
"Daniel Haude" wrote:
感谢您的任何建议。




以下是一对:


1.在Google上搜索quirks模式。

2.在CSS群组中询问。


-

phil [dot] ronan @ virgin [dot] net
http:/ /vzone.virgin.net/phil.ronan/


2005年10月19日,Daniel Haude写道:
On 19 Oct 2005, Daniel Haude wrote:
我想,为什么不做正确而只使用CSS和DIV。
I thought, why not do it right and use only CSS and DIVs.




是的,对!使用HTML 4.01 Compact - 它有* no *元素但是

DIV和SPAN。


scnr


- -

Netscape 3.04可以完成我需要的一切,而且它非常可靠。

我为什么要切换? Peter T. Daniels in< news:sci.lang>



Yes, right! Use HTML 4.01 Compact - it has *no* elements but
DIV and SPAN.

scnr

--
Netscape 3.04 does everything I need, and it''s utterly reliable.
Why should I switch? Peter T. Daniels in <news:sci.lang>


2005年10月19日12:25:26 GMT,Daniel Haude< mu ** **@yahoo.com>写道:
On 19 Oct 2005 12:25:26 GMT, Daniel Haude <mu****@yahoo.com> wrote:
如果任何列的内容比其他列的内容长,并且超出页面底部,我希望更短的列相应地延伸。就像一张桌子一样。
if the content of any column is longer than the others and goes
beyond the bottom of the page, I want the shorter columns to
extend accordingly. Like a table would, too.




所以请使用< table>当你把这些elemetns

的行为结合在一起时,你将它们隐含地定义为一个相关的集合

元素 - 或表格。


表格并不坏,只是在没有必要时它们被误用了。

如果你做的事情真的是桌子比如,然后去

表。



So use a <table> When you couple the behaviour of these elemetns
together like this, you are implictly defining them to be a related set
of elements - or a table.

Tables aren''t bad, it''s just that they were mis-used when not necessary.
if you''re doing something that really is "table like", then go with the
table.


这篇关于从表格布局过渡到CSS:我真傻吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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