问题描述
您好,
我熟悉使用表格进行网页布局。现在我正在做新的页面,而我正在看它,我想,为什么不做正确的
并且只使用CSS和DIV。 br />
有问题的页面是一个简单的柱状布局。我想要完成的是
,所有三列都至少是浏览器窗口的高度
(即使它们的内容更短),如果
任何列的内容都比其他列长,并且超出页面底部的
,我希望更短的列
相应地扩展。就像桌子一样。
嗯,迄今为止的结果是绝对的,完全的灾难。我已经设法创建了一个页面,在四个不同的浏览器上呈现不同的页面,总是错误的,IE甚至都不在其中。
请看这里的页面:。
这是一个包含更多解释性文字和一些
浏览器屏幕截图的页面:
感谢您的任何建议。
- 丹尼尔
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
推荐答案
以下是一对:
1.在Google上搜索quirks模式。
2.在CSS群组中询问。
-
phil [dot] ronan @ virgin [dot] net
是的,对!使用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>
所以请使用< 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:我真傻吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!