准备写一篇爆炸CSS的帖子。 [英] Preparing to write a post that blasts CSS.

查看:82
本文介绍了准备写一篇爆炸CSS的帖子。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的数字在我去之前写下我为什么要回到

表并且只使用CSS来获取字体,颜色和东西的总结,我应该make

我确定我的事实是对的。那么,请告诉我如何才能得到这个:


< div style =" border:1px solid#000; width:100%">

< table style =" background:#CABE9E;

保证金:10px 10px 10px 10px;

border-bottom:4px solid#000;

border-left:4px solid#000;

border-right:4px solid#000;

border-top:4px solid#000;

宽度:100%;">

< tr>< td>一些表格内容...< / td>< td>在firefox中溢出,和$ / b $ b导致IE中的永久性垂直滚动< / td>< / tr>< / table>

< / div>

看起来像这样:


< table cellspacing =" 0" CELLPADDING = QUOT 1 QUOT; bgcolor =" 000000"

width =" 100%">< tr>< td>

< table bgcolor =" ffffff" CELLPADDING = QUOT; 8英寸cellspacing =" 0"

width =" 100%">< tr>< td>

< table bgcolor =" 000000" CELLPADDING = QUOT; 4英寸cellspacing =" 0"

width =" 100%">< tr>< td>

< table bgcolor =" CABE9E" CELLPADDING = QUOT; 4英寸width =" 100%">< tr>< td>一些

表格内容...< / td>< td>在firefox中溢出,导致永远存在< br&>
IE中的垂直滚动< / td>< / tr>< / table>< / td>< / tr>< / table>

< / td>< / tr>< / table>

< / td>< / tr>< / table>


试试吧在IE和Firefox中都有。


显然CSS的规范说明在调整div的大小时边界和边距不应该计算
/表。看看这个

(这些)错误报告:

https://bugzilla.mozilla.org/show_bug.cgi?id=258523


但IE也做坏事 - 注意你的底部有一个水平卷轴

吧,无论你的屏幕有多宽(使用CSS

版本)。

但桌面版本在两种浏览器中看起来都很好。


无论如何,如果我遗漏了一些可以解决这个问题的事情,请告诉我。


I figure before I go and write my summary of why you should go back to
tables and only use CSS for fonts and colors and stuff, I ought to make
sure I''ve got my facts right. So, please tell me how I can get this:

<div style="border:1px solid #000;width:100% ">
<table style="background:#CABE9E;
margin:10px 10px 10px 10px;
border-bottom:4px solid #000;
border-left:4px solid #000;
border-right:4px solid #000;
border-top:4px solid #000;
width:100%;">
<tr><td>some table stuff...</td><td>spills over in firefox, and
causes everpresent vertical scroll in IE</td></tr></table>
</div>

to look like this:

<table cellspacing="0" cellpadding="1" bgcolor="000000"
width="100%"><tr><td>
<table bgcolor="ffffff" cellpadding="8" cellspacing="0"
width="100%"><tr><td>
<table bgcolor="000000" cellpadding="4" cellspacing="0"
width="100%"><tr><td>
<table bgcolor="CABE9E" cellpadding="4" width="100%"><tr><td>some
table stuff...</td><td>spills over in firefox, and causes everpresent
vertical scroll in IE</td></tr></table></td></tr></table>
</td></tr></table>
</td></tr></table>

Try them in both IE and Firefox.

Apparently the spec for CSS says that the border and margins shouldn''t
be counted when calcing the size of the div/table. Take a look at this
(these) bug reports:

https://bugzilla.mozilla.org/show_bug.cgi?id=258523

But IE does something bad too- notice that you get a horizontal scroll
bar at the bottom, no matter how wide your screen goes (with the CSS
version).

But the table version looks fine in both browsers.

Anyway, if I''m missing something that would fix this, tell me.

推荐答案



dt ** **** @ hotmail.com 写道:
在我去之前写一下我为什么要回到
表并且只使用CSS表示字体的总结颜色和东西,我应该做的确定我的事实是对的。


只是因为你不能用CSS来制作布局并不代表每个人

否则不能。

显然CSS的规范说明在调整div / table的大小时不应计算边框和边距。
I figure before I go and write my summary of why you should go back to
tables and only use CSS for fonts and colors and stuff, I ought to make
sure I''ve got my facts right.
Just because you can''t use CSS to make a layout doesn''t mean everyone
else can''t.
Apparently the spec for CSS says that the border and margins shouldn''t
be counted when calcing the size of the div/table.




事实上,他们将边距/边框/填充添加到宽度/高度。
http://www.w3.org/TR/REC-CSS2/box.html


PS桌面版让我感到恶心需要四张桌子才能完成

这么简单。



Infact they do margin/border/padding add to the width/height.
http://www.w3.org/TR/REC-CSS2/box.html

P.S. The table version makes me sick it takes four table to do
something so simple.


引用来自:W3C | http://www.w3.org/TR/REC- CSS2 / box.html


"框宽度由左右边距的总和给出,

边框和填充,以及内容宽度。高度由顶部和底部边距,边框和填充以及内容

高度的

总和给出。

Quote From: W3C | http://www.w3.org/TR/REC-CSS2/box.html

"The box width is given by the sum of the left and right margins,
border, and padding, and the content width. The height is given by the
sum of the top and bottom margins, border, and padding, and the content
height."

在comp.infosystems中的


www.authoring.stylesheets dt******@hotmail.com

写道:
in comp.infosystems.www.authoring.stylesheets, dt******@hotmail.com
wrote:

我在去之前写下我为什么要回到表格的总结,并且只使用CSS来表示字体和颜色以及其他东西,我应该确定
确定我的事实是对的。那么,请告诉我如何得到这个:


你没有。抱怨CSS是非常傲慢的,当你不知道甚至是非常基本的时候。即使对于高级的东西,它也绝对不是错误的,但是浏览器支持。


浏览器不完全支持表格,我认为CSS是至少

也支持。


[失败]

看起来像这样:


[过于复杂的表格,你可以减少至少2.当然,然后

你必须知道如何使用表格。]


div {border:1px solid black; background:#fff; padding:8px;}

table {border:4px solid#000; padding:4px; background:#CABE9E; width:100%; }


< div>

< table>< tr>< td>一些

表的东西.. 。< / td>< td>在Firefox中溢出,并导致永远存在

IE中的垂直滚动< / td>< / tr>< / table>

< / div>

在IE和Firefox中试用它们。


没有,因为你没有给任何网址。但很明显你的问题是什么?b $ b。简单的治疗就是KISS。

无论如何,如果我遗失了什么

I figure before I go and write my summary of why you should go back to
tables and only use CSS for fonts and colors and stuff, I ought to make
sure I''ve got my facts right. So, please tell me how I can get this:
You didn''t. It is quite arrogant to complain about CSS, when you don''t
know even the very basics. And even for advanced stuff, it is never fault
of CSS, but browers support.

Tables are not fully supported by browsers, I think that CSS is at least
as well supported.

[failure]
to look like this:

[overcomplicated tables, you could have cut at least 2. Of course, then
you would have to know how to use tables.]

div {border:1px solid black;background:#fff;padding:8px;}
table {border:4px solid #000;padding:4px;background:#CABE9E;width:100%;}

<div>
<table><tr><td>some
table stuff...</td><td>spills over in firefox, and causes everpresent
vertical scroll in IE</td></tr></table>
</div>
Try them in both IE and Firefox.
Didn''t as you didn''t give any URL. But it was clear what your problem
was. Simple cure is KISS.
Anyway, if I''m missing something




你没有错过我的杀戮文件。

-

Lauri Raittila< http://www.iki.fi/lr> < http://www.iki.fi/zwak/fonts>

Kohtuuhintainen yksi?/ huone haussa Oulusta syyskuusta eteenp?in。

在轴上搜索睡觉的地方波恩 - Tsech - 波兰 - 波罗的海在

7月



You didn''t miss my killfile.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Kohtuuhintainen yksi?/huone haussa Oulusta syyskuusta eteenp?in.
Searching places to sleep on axis Bonn - Tsech - Poland - baltic sea in
july


这篇关于准备写一篇爆炸CSS的帖子。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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