< DIV>由于font-size属性的更改而显着扩展 [英] <div> expands dramatically due to change in font-size property

查看:98
本文介绍了< DIV>由于font-size属性的更改而显着扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅

http:// www .geocities.com / operationsengineer1 / test.htm


了解我希望我的徽标标题div如何布局。


,当我去调整大小测试时到2em(从1em开始),这就是

发生的事情......

http://www.geocities.com/operationsengineer1/test1.htm


div增加到两倍大小也是!


这对我来说完全出乎意料,然而,它显示了这种方式在

ie6和ff1所以我认为它正确渲染我'已经编码了

错误的东西。


任何指导都会受到赞赏。

please see

http://www.geocities.com/operationsengineer1/test.htm

for an idea of how i want my logo header div to be layed out.

when i went to resize "Test" to 2em (from 1em), this is what
happened...

http://www.geocities.com/operationsengineer1/test1.htm

the div expanded to twice the size, too!

this was totally unexpected to me, however, it displays this way in
both ie6 and ff1 so i think it is rendering correctly and i''ve coded
something incorrectly.

any guidance would be appreciated.

推荐答案

我应该说div按比例扩大到该div的

字体大小声明的增加。


at font -size:1em;一切都很棒。


在font-size:2em;有一个双重 - 甚至在我的容器之外。 div

包含徽标标题div ..

i should say the div expands proportionally to an increase in the
font-size declaration of that div.

at font-size: 1em; everything is great.

at font-size: 2em; there is a double - even outside my "container" div
which houses the logo header div..


" skeeterbug" < JS ****** @ san.rr.com>写道:
"skeeterbug" <js******@san.rr.com> wrote:
http:// www.geocities.com/operationsengineer1/test.htm

了解我希望我的徽标标题div如何布局。

当我去的时候调整大小测试到2em(从1em开始),这就是
发生的事情......

http://www.geocities.com/operationsengineer1/test1.htm

扩展到两倍大小!
http://www.geocities.com/operationsengineer1/test.htm

for an idea of how i want my logo header div to be layed out.

when i went to resize "Test" to 2em (from 1em), this is what
happened...

http://www.geocities.com/operationsengineer1/test1.htm

the div expanded to twice the size, too!




有道理。你告诉div是字体大小的6倍然后

你的字体大小加倍了。


当长度是在em中定义的值1em因物业而异。

被定义:

对于font-size 1em =父元素的字体大小。

对于所有其他属性1em =当前元素的字体大小。


Steve



Makes sense. You''ve told the div to be 6 times the font-size and then
you''ve doubled the font size.

When a length is defined in em the value of 1em varies on the property
being defined:
For font-size 1em = the font-size of the parent element.
For all other properties 1em = the font size of the current element.

Steve


On 2005年1月11日13:26:28 -0800,skeeterbug < JS ****** @ san.rr.com>写道:
On 11 Jan 2005 13:26:28 -0800, "skeeterbug" <js******@san.rr.com> wrote:
请参阅
http://www.geocities.com/operationsengineer1/test.htm
了解我希望我的徽标标题div是如何布局的。
当我去调整大小时"试验"到2em(从1em),这就是
发生的......
http://www.geocities.com/operationsengineer1/test1.htm
div扩大到两倍大小!
please see
http://www.geocities.com/operationsengineer1/test.htm
for an idea of how i want my logo header div to be layed out.
when i went to resize "Test" to 2em (from 1em), this is what
happened...
http://www.geocities.com/operationsengineer1/test1.htm
the div expanded to twice the size, too!




真的很难说。


你的严格当您从地理位置提供页面时,doctype

嗅探器将不会获取doctype声明,因此来自该位置的任何内容都将以怪癖呈现;模式无论你怎么做才能尝试做到这一点。


没有免费午餐这样的东西

(或_free_ www服务器:-)

-

Rex



Hard to tell really.

Your "strict" doctype declaration will not be picked up by the doctype
sniffers when you serve a page from geocities, so anything that comes
out of that place will be rendered in "quirks" mode regardless of what
you do to try to get it right.

There is no such thing as a free lunch
(or a _free_ www server for that matter :-)

--
Rex


这篇关于&LT; DIV&GT;由于font-size属性的更改而显着扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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