IE和Netscape的区别 [英] Difference in IE and Netscape

查看:70
本文介绍了IE和Netscape的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面( www.eastex.net/ben/ NewETN / index3.asp )在IE中显示OK,

但不在Netscape中。我使用了padding-top和height

属性的组合来获得四个单元格的总高度。 Netscape似乎不是b
尊重padding-top,而只是高度,导致细胞

太短。


我在CSS中有哪些选项?我希望能够通过使用一个明确的属性指定

高度(我认为高度是答案,但是

我的文本然后到达单元格的顶部,我希望它居中。


请帮忙!你可以去页面看看我在说什么。


谢谢,

Ben

I have a page (www.eastex.net/ben/NewETN/index3.asp) that displays OK in IE,
but not in Netscape. I used a combination of padding-top and height
attributes to get a total height on four cells. Netscape seems to not
respect the padding-top, and only goes by the height, resulting in the cells
being too short.

What options do I have in CSS? I would like to be able to specify the
height by using a definite attribute (I thought height was the answer, but
my text then goes to the top of the cell, and I want it centered).

Please Help!!! You can go to the page to see what I''m talking about.

Thanks,
Ben

推荐答案

Ben写道:
我有一个页面( www.eastex.net/ben/NewETN/index3.asp


哇。这是一个巨大的js。它有什么作用?是否有必要?

你应该把它放在一个separte文件中,这样非js浏览器就没有

来下载它。
$ b在IE中显示OK的
$ b

一个幸福的事故,看来,你似乎没有费心验证你的代码。

http:// validator .w3.org / check?uri = ht ... N%2Findex3.asp

但不在Netscape中。


哪个版本? 4.x是一个完全不同于6.x +的浏览器。

我使用了padding-top和height
属性的组合来获得四个单元格的总高度。
I have a page (www.eastex.net/ben/NewETN/index3.asp)
Wow. That''s an enormous amount of js. What does it do? Is it necessary?
you should put it in a separte file, so that non-js browsers won''t have
to download it.
that displays OK in IE
A happy accident since, it appears, you didn''t bother validating your code.

http://validator.w3.org/check?uri=ht...N%2Findex3.asp
but not in Netscape.
Which version? 4.x is a completely different browser than 6.x +.
I used a combination of padding-top and height
attributes to get a total height on four cells.




布局表?那太糟糕了。

http:/ /www.allmyfaqs.com/faq.pl?Tableless_layouts


(试图躲避很快就会出现的巨魔)


-

Brian(从我的地址中删除无效给我发电子邮件)
http://www.tsmchughs.com/


Ben写道:
我有一个页面( www.eastex.net/ben/NewETN/ index3.asp


哇。这是一个巨大的js。它有什么作用?是否有必要?

你应该把它放在一个separte文件中,这样非js浏览器就没有

来下载它。
$ b在IE中显示OK的
$ b

一个幸福的事故,看来,你似乎没有费心验证你的代码。

http:// validator .w3.org / check?uri = ht ... N%2Findex3.asp

但不在Netscape中。


哪个版本? 4.x是一个完全不同于6.x +的浏览器。

我使用了padding-top和height
属性的组合来获得四个单元格的总高度。
I have a page (www.eastex.net/ben/NewETN/index3.asp)
Wow. That''s an enormous amount of js. What does it do? Is it necessary?
you should put it in a separte file, so that non-js browsers won''t have
to download it.
that displays OK in IE
A happy accident since, it appears, you didn''t bother validating your code.

http://validator.w3.org/check?uri=ht...N%2Findex3.asp
but not in Netscape.
Which version? 4.x is a completely different browser than 6.x +.
I used a combination of padding-top and height
attributes to get a total height on four cells.




布局表?那太糟糕了。

http:/ /www.allmyfaqs.com/faq.pl?Tableless_layouts


(试图躲避很快就会出现的巨魔)


-

Brian(从我的地址中删除无效给我发电子邮件)
http://www.tsmchughs.com/


Ben写道:
我有一个页面( www.eastex.net/ben/NewETN/ index3.asp )在IE中显示OK,但在Netscape中不显示。我使用了padding-top和
height属性的组合来获得四个单元格的总高度。 Netscape
似乎不尊重填充顶部,只有高度,
导致细胞太短。


目前还不清楚你认为问题是什么。我刚刚在一个浏览器中浏览了这个页面,并将屏幕截图传递给了Photoshop,而且高度不是很大。 (IE 6,Netscape 7.1和Firefox 0.8)。高度从510到519像素不等。


我只是在测试页面中构建一个表格,而Netscape 7.1肯定尊重

全面填充。 (如果你的意思是NN4,我就不能发表评论了。我忽略了它的问题。)


不同的浏览器在诸如段落之类的东西上有不同的默认边距

&安培;头。明确设置它们会很有用。

我在CSS中有哪些选项?我希望能够通过使用一个明确的属性来指定
高度(我认为高度是
答案,但我的文本然后到达单元格的顶部,我想要它
居中)。
I have a page (www.eastex.net/ben/NewETN/index3.asp) that displays OK
in IE, but not in Netscape. I used a combination of padding-top and
height attributes to get a total height on four cells. Netscape
seems to not respect the padding-top, and only goes by the height,
resulting in the cells being too short.
It isn''t clear what you think the problem is. I''ve just viewed that page in a
number of browsers, and passed screen-shots to Photoshop, and the heights are
not very different. (IE 6, Netscape 7.1, and Firefox 0.8). The heights ranged
from 510 to 519 pixels.

I''ve just build a table in a test page, and Netscape 7.1 certainly respects
padding all round. (If you mean NN4, I can''t comment. I ignore its problems).

Different browsers have different default margins on such things as paragraphs
& headers. It can be useful to set these explicitly.
What options do I have in CSS? I would like to be able to specify the
height by using a definite attribute (I thought height was the
answer, but my text then goes to the top of the cell, and I want it
centered).



[snip]


一般情况下,您无法通过控件上的像素级控制表格

table&细胞本身。在某些时候,内容将覆盖您尝试应用的任何

控件。这是表格的好处之一,虽然它可能不会出现这种情况!例如,当使用较大的文本大小查看

时,您的布局会非常糟糕。如果用户的系统与你开发的字体有不同的字体,它可能会破坏。您似乎正在尝试使用绝对定位在表格的底部单元格上定位
位置文本。我认为这是你发布的内容。这是一个非常危险的任务。


如果你真的想要对表格的高度(和宽度)进行像素级控制,那么你可能需要将每个单元格的内容包装在< div> ...< / div>中,然后

控制< div>通过CSS。 {身高:300px;溢出:自动; }。该表将

对该< div>的大小做出反应。但这可能是不明智的。你将会更安全地允许表格的高度扩展到所需的数量,例如,如果用户使用较大的文本运行,则为b $ b示例。这意味着,不要尝试使用绝对定位在桌面上定位

文本,而是将*放入*单元格中,

因此它将与它们一起移动。就像你在底栏中的按钮一样。


-

Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/


[snip]

In general, you can''t control tables at the pixel-level via controls on the
tables & cells themselves. At some point, the content will override whatever
controls you try to apply. That is one of the benefits of tables, although it
may not appear that way! For example, your layout breaks quite badly when
viewed with a larger text size. It might break if the user''s system had
different fonts from the ones you developed with. You appear to be trying to
position text over the bottom cell of the table using absolute positioning. I
think that is what you are posting about. That is a very risky task.

If you really want pixel-level control of the height (and width) of a table,
you probably need to wrap the content of each cell in <div>...</div>, then
control that <div> via CSS. { height: 300px; overflow: auto; }. The table will
react to the size of that <div>. But this is probably unwise. You would be
much safer allowing the height of the table to expand as much as needed, for
example if the user runs with larger text. This means, don''t try to position
text over the table using absolute positioning, but put it *into* the cells,
so it will move with them. As you did with the button in the bottom bar.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/


这篇关于IE和Netscape的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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