DIVS和填充在Firefox和IE6中的工作方式不同(请帮助) [英] DIVS and padding work differently in Firefox and IE6 (Help please)

查看:33
本文介绍了DIVS和填充在Firefox和IE6中的工作方式不同(请帮助)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我在IE6和Firefox中遇到div和padding问题。基本上我已经附加的

示例在IE6中完全符合我的要求,但在Firefox中对待
填充的处理方式不同。我的例子如下。

http:// www .villas2u.com / example / test.htm
http://www.villas2u.com/example/styles.css


我意识到问题在于10px的填充推动了

对齐输出,有没有一种方法在

文本块的每一侧都有10px,并且仍然可以在整个100%内切换页面。


帮助赞赏。


谢谢。

Hi,

I have a problem with divs and padding in IE6 and Firefox. Basically my
example that I have attached works exactly how I want in IE6, but
padding is treated differently in Firefox. My example is below.

http://www.villas2u.com/example/test.htm
http://www.villas2u.com/example/styles.css

I realise that the issue is with the padding of 10px pushing the
alignment out, is there a way of having exactly 10px at each side of a
text block and still have the page cut across the full 100%.

Help appreciated.

Thanks.

推荐答案

Spondishy写道:
Spondishy wrote:


我在IE6和Firefox中遇到div和padding问题。基本上我的附件示例在IE6中完全符合我的要求,但在Firefox中对待填充的方式不同。我的例子如下。

http:// www .villas2u.com / example / test.htm
http://www.villas2u.com/example/styles.css

我意识到问题在于10px的填充推动
对齐,是否存在在
文本块的每一侧都有10px的方式,并且仍然可以在整个100%的页面上切割。

帮助表示赞赏。

谢谢。
Hi,

I have a problem with divs and padding in IE6 and Firefox. Basically my
example that I have attached works exactly how I want in IE6, but
padding is treated differently in Firefox. My example is below.

http://www.villas2u.com/example/test.htm
http://www.villas2u.com/example/styles.css

I realise that the issue is with the padding of 10px pushing the
alignment out, is there a way of having exactly 10px at each side of a
text block and still have the page cut across the full 100%.

Help appreciated.

Thanks.




谷歌怪癖/标准模式


使用触发标准模式的doctype



google on quirks / standard mode

use a doctype that triggers standard mode


我已经在页面中添加了doctype声明,用于古怪/标准,但

并没有一点点差别。我是否必须接受

当在Firefox中填充div时它们向外填充并且IE填充内部?


谢谢。


马丁!写道:
I''ve added doctype declarations to the page for quirky/standard, but
that doesn''t make a blind bit of difference. Do I have to accept that
when divs are padded in Firefox they pad outwards and IE pads inwards?

Thanks.

Martin! wrote:
Spondishy写道:
Spondishy wrote:


我在IE6和Firefox中遇到div和padding的问题。
基本上我附加的示例在IE6中完全符合我的要求,但在Firefox中对待填充的方式不同。我的例子如下。

http:// www .villas2u.com / example / test.htm
http://www.villas2u.com/example/styles.css

我意识到问题在于10px的填充推动
对齐,是否存在在每一侧只有10px的方式
的文本块仍然有整个100%的页面切割。

帮助赞赏。

谢谢。
Hi,

I have a problem with divs and padding in IE6 and Firefox. Basically my example that I have attached works exactly how I want in IE6, but
padding is treated differently in Firefox. My example is below.

http://www.villas2u.com/example/test.htm
http://www.villas2u.com/example/styles.css

I realise that the issue is with the padding of 10px pushing the
alignment out, is there a way of having exactly 10px at each side of a text block and still have the page cut across the full 100%.

Help appreciated.

Thanks.



google on quirks / standard mode

使用触发标准模式的doctype



google on quirks / standard mode

use a doctype that triggers standard mode






好的,我已经让IE6和Firefox以相同的方式工作,按照doc类型添加



<!DOCTYPE html PUBLIC" - // W3C // DTD HTML 4.01 // EN"

" http://www.w3.org/TR/html4/DTD/strict.dtd">


i ssue是,我喜欢它在IE6中的工作方式,所以我会用b $ b来重新解释这个问题。我在三列布局中有三个div(20%,

60%,20%)。


如何在中间div中获取文本在没有推出第三个div的情况下,它的任何一侧都有10px的差距




感谢您的帮助。

OK, I''ve got IE6 and Firefox working in the same way adding the
following doc type:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/DTD/strict.dtd">

The issue is, is that I liked the way it worked in IE6, so I''ll
rephrase the question. I have three divs in a three column layout (20%,
60%, 20%).

How can I get the text in the middle div to have a gap of exactly 10px
either side of it without pushing the third div out of line?

Thanks for you help.


这篇关于DIVS和填充在Firefox和IE6中的工作方式不同(请帮助)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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