每个50%宽度的两个DIV =问题? [英] Two DIV with 50% width each = problem?

查看:101
本文介绍了每个50%宽度的两个DIV =问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试并排两个div,每个占据了
身体的50%。听起来很简单吧?
http://novodom.net/div.html


代码验证为XHTML 1.1 Strict。

在Firefox中看起来很好,但在IE 6.x中,第二个DIV低于

第一个!每次使用49%可以解决问题,但我不会打电话给'b $ b'解决方案''。


我的CSS有什么问题?任何人都可以提出建议吗?

谢谢。

I''m trying to have two divs side-by-side, each taking up 50% of the
body. Sounds simple enough, right?
http://novodom.net/div.html

The code validates as XHTML 1.1 Strict.
Looks fine in Firefox, but in IE 6.x, the second DIV is below the
first one! Using 49% for each resolves the problem but I wouldn''t call
that a ''solution''.

Is there something wrong with my CSS? Can anyone suggest something?
Thanks.

推荐答案

在comp.infosystems中。 www.authoring.stylesheets 特里说:
In comp.infosystems.www.authoring.stylesheets Terry said:
我想要两个div并排,每个占据了身体的50%。听起来很简单吧?
http://novodom.net/div.html
在Firefox中看起来不错,但在IE 6.x中,第二个DIV低于第一个DIV!


IE无法做数学。你会偶尔遇到它和

不同的东西。

每次使用49%解决了这个问题,但我不会打电话给
那个''解决方案''。
I''m trying to have two divs side-by-side, each taking up 50% of the
body. Sounds simple enough, right?
http://novodom.net/div.html
Looks fine in Firefox, but in IE 6.x, the second DIV is below the
first one!
IE cant do maths. you''ll come across it every now and then with
different things.
Using 49% for each resolves the problem but I wouldn''t call
that a ''solution''.




如果你的设计不能忍受2%的差异你就会陷入困境中


-


voicesofthelittle



if your design cant tolerate a 2% variance you''re in deep shit

--

v o i c e s o f t h e l i t t l e


我的设计绝对可以容忍它,别担心。

但是我想从''table-for-layout-must-die''获得一些反馈

人群...你怎么建议解决这类问题?这个

正是为什么我到目前为止一直坚持使用表格:有些东西需要花费2分钟来处理表格需要花费数小时的时间来实现

with css ... arrrgh。

Original :: brucie :: 2004-10-30 02:02
My design can definitely tolerate it, don''t worry.
But I''d like to have some feedback from the ''tables-for-layout-must-die''
crowd ... how do you suggest getting around that kind of problem? This
is exactly why I''ve stuck with tables until now: some things that take
me 2 minutes to do with tables take me hours of fidgeting to achieve
with css... arrrgh.
Original :: brucie :: 2004-10-30 02:02
在comp。 infosystems。 www.authoring.stylesheets 特里说:
In comp.infosystems.www.authoring.stylesheets Terry said:
我正在尝试并排两个div,每个占据了整个身体的50%。听起来很简单吧?
http://novodom.net/div.html
在Firefox中看起来不错,但在IE 6.x中,第二个DIV低于第一个DIV!
I''m trying to have two divs side-by-side, each taking up 50% of the
body. Sounds simple enough, right?
http://novodom.net/div.html
Looks fine in Firefox, but in IE 6.x, the second DIV is below the
first one!



IE无法进行数学运算。你偶尔会遇到不同的东西。



IE cant do maths. you''ll come across it every now and then with
different things.

每次使用49%可以解决问题,但我不会打电话给
那个''解决方案''。
Using 49% for each resolves the problem but I wouldn''t call
that a ''solution''.



如果你的设计不能容忍2%的差异,你就会陷入困境



if your design cant tolerate a 2% variance you''re in deep shit



在comp.infosystems中。 www.authoring.stylesheets 特里说:
In comp.infosystems.www.authoring.stylesheets Terry said:
我的设计绝对可以容忍它,别担心。


很好,但请不要反对,这会扰乱小声音。


如何在Usenet中正确引用? - 引用和回答
http://www.netmeister.org/ news / learn2quote2.html

Usenet的引用惯例的优点
http://homepage.ntlworld.com/g.mccau...ks/uquote.html


为什么Bottom-post比Top-posting更好
http://www.caliburn.nl/topposting.html

发布到Usenet的规则
http://www.faqs.org/faqs/usenet/posting-rules/part1/


底部与Usenet上的顶级帖子和报价方式
http://www.cs.tut.fi/~jkorp ela / usenet / brox.html


你是什么意思我的回复是颠倒的 ?
http://www.i -hate-computers.demon.co.uk/quote.html

但我想从''tables-for-layout-must-die'获得一些反馈'
人群......你怎么建议绕过那种问题?
My design can definitely tolerate it, don''t worry.
good but please don''t toppost, it upsets the little voices.

How do I quote correctly in Usenet? - Quoting and Answering
http://www.netmeister.org/news/learn2quote2.html

The advantages of Usenet''s quoting conventions
http://homepage.ntlworld.com/g.mccau...ks/uquote.html

Why is Bottom-posting better than Top-posting
http://www.caliburn.nl/topposting.html

Rules for posting to Usenet
http://www.faqs.org/faqs/usenet/posting-rules/part1/

Bottom vs. top posting and quotation style on Usenet
http://www.cs.tut.fi/~jkorpela/usenet/brox.html

What do you mean "my reply is upside-down" ?
http://www.i-hate-computers.demon.co.uk/quote.html
But I''d like to have some feedback from the ''tables-for-layout-must-die''
crowd ... how do you suggest getting around that kind of problem?




有什么问题?它不值得担心。有多少人会碰到你的页面然后惊恐地逃跑,因为他们注意到

的一半是49而不是50%?

你可能会有一半的边距/填充,所以只需减少它们

来补偿或呈现49到IE和50到其他浏览器。


停止尝试成为一名控制狂。


-


voicesofthelittle



what problem? its not worth worrying about. how many people are going to
come across your page and run away in horror because they notice the
halves are 49 and not 50%?

you''ll probably have margins/padding on the halves so just reduce them
to compensate or present 49 to IE and 50 to other browsers.

stop trying to be a control freak.

--

v o i c e s o f t h e l i t t l e


这篇关于每个50%宽度的两个DIV =问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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