字体大小调整问题 [英] font sizing problem

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

问题描述

我有一些看起来像这样的CSS:


身体{

保证金:0;

字体-family:Arial,Helvetica,sans-serif;

字体大小:140.01%;

颜色:#000000;

}


但IE不会将字体大小应用于表格单元格中的文本,所以我不得不将
修改为:


身体{

保证金:0;

}


身体,td {

font-family:Arial,Helvetica,sans-serif;

font-size:140.01%;

颜色:#000000;

}


这个修复它在IE中以MZ购买表格单元格中的字体大小太多了b / b
大。我相信这是140.01%的140.01%。我认为唯一的方法是根据浏览器加载特定的样式表。


这是正确的方法来实现这个目标或者还有更好的办法吗?

Andrew Poulos


PS增加了0.01%,因为有人告诉我,我不知道

足以让字体不同意。

I''ve got some CSS that looks like this:

body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
font-size: 140.01%;
color: #000000;
}

but IE won''t apply the font size to text in table cells so I''ve had to
modify it to this:

body {
margin: 0;
}

body, td {
font-family: Arial, Helvetica, sans-serif;
font-size: 140.01%;
color: #000000;
}

This "fixes" it in IE buy in MZ the font size in table cells is too
large. I believe it''s 140.01% of 140.01%. I think the only way around
this is to load a specific style sheet depending on the the browser.

Is this the right way to go about this or is there a better way?
Andrew Poulos

PS the .01% was added because someone told me to and I didn''t know
enough about fonts to disagree.

推荐答案




Andrew Poulos写道:
Hi,

Andrew Poulos wrote:
[...]
这是正确的方法还是有更好的方法?
[...]
Is this the right way to go about this or is there a better way?



什么是IE版本?

您的代码是否有效?

您是否有示例页面?

您如何确切地想要字体大小?


Chris


What IE-Version?
Is your code valid?
Do you have an example-page?
How do you exactly want the font-size?

Chris


Chris Leipold写道:
Chris Leipold wrote:

Andrew Poulos写道:
Hi,

Andrew Poulos wrote:
> [...]
>这是解决这个问题的正确方法还是有更好的方法?什么是IE版本?
> [...]
> Is this the right way to go about this or is there a better way? What IE-Version?



V.6

你的代码有效吗?
http://validator.w3.org/check

你有一个示例页面吗?
我没有页面的URL,但这里的代码是:


<?xml version =" 1.0" encoding =" iso-8859-1"?>

<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

< html xmlns =" http://www.w3。 org / 1999 / xhtml">

< head>

< title> test< / title>

< meta http-当量= QUOT;内容类型"含量=" text / html的;字符集= ISO-8859-1" />

< meta http-equiv =" Content-Style"含量="文本/ CSS" />

< style type =" text / css">

<! -

body {

font-family:Arial,Helvetica,sans-serif;

font-size:200.01%;

}

# layer1 {

cursor:pointer;

position:absolute;

left:210px;

top:120px;

宽度:600px;

背景色:#ccffff;>

}

- >

< / style>

< / head>

< body>


< div id =" layer1">

< table width =" 100%">

< tr>

< td width =" 20">< img id =" img0" SRC =" btn_norm.png" alt =" bullet"

title =" bullet point"宽度= QUOT 18 QUOT;高度= QUOT 18 QUOT; />< / td>

< td>这是第一行。< / td>

< / tr>

< / table>

< / div>


< / body>

< / html>

你如何确切地想要字体大小?


V.6
Is your code valid? It checks out with http://validator.w3.org/check
Do you have an example-page? I don''t have a URL to a page but here''s the code:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style" content="text/css" />
<style type="text/css">
<!--
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 200.01%;
}
#layer1 {
cursor: pointer;
position: absolute;
left: 210px;
top: 120px;
width: 600px;
background-color: #ccffff;>
}
-->
</style>
</head>
<body>

<div id="layer1">
<table width="100%">
<tr>
<td width="20"><img id="img0" src="btn_norm.png" alt="bullet"
title="bullet point" width="18" height="18" /></td>
<td>This is the first line.</td>
</tr>
</table>
</div>

</body>
</html>
How do you exactly want the font-size?




如果100%通常是12点那么我假设/希望200%是bpt b / b
。 200%是我想要的大小。


表格单元格中的文本在IE6中显示为100%。在MZ,它显示为
200%。如果我从body更改CSS选择器到身体,td那么表格单元格中的

文本在IE中显示为200%(这就是我想要的)但在MZ中显示为
400%(我不想要) 。


Andrew Poulos



If 100% is typically 12 point then I''m assuming/hoping that 200% is
24pt. 200% is the size I want.

The text in table cells displays at 100% in IE6. In MZ it displays at
200%. If I change the CSS selector from "body" to "body, td" then the
text in table cells displays at 200% (which is what I want) in IE but at
400% (which I don''t want) in MZ.

Andrew Poulos

在comp.infosystems中的


www.authoring.stylesheets ,Andrew Poulos写道:
in comp.infosystems.www.authoring.stylesheets, Andrew Poulos wrote:
我有一些看起来像这样的CSS:

body {font-size:140.01%;但是IE不会将字体大小应用于表格单元格中的文本,所以我不得不将其修改为:


为什么你使用140%的身体字体?

body,td {font-size:140.01%; }


身体将是正常的140%

td将是140%的身体字体。所以大概是正常的两倍。


使用

td {font-size:inherit}

它可能有效。

这个修复它在IE中购买MZ表格中的字体大小太大了。我相信这是140.01%的140.01%。我认为唯一的方法是根据浏览器加载特定的样式表。

这是正确的方法,还是有更好的方法?
PS增加.01%是因为有人告诉我,我不知道
足够的字体不同意。
I''ve got some CSS that looks like this:

body { font-size: 140.01%; }

but IE won''t apply the font size to text in table cells so I''ve had to
modify it to this:
Why are you using 140% font for body?
body, td {font-size: 140.01%; }
body will be 140% of normal
td will be 140% from body font. So about twice as big as normal.

Use
td {font-size:inherit}
it might work.
This "fixes" it in IE buy in MZ the font size in table cells is too
large. I believe it''s 140.01% of 140.01%. I think the only way around
this is to load a specific style sheet depending on the the browser.

Is this the right way to go about this or is there a better way? PS the .01% was added because someone told me to and I didn''t know
enough about fonts to disagree.




Not通常需要。 IIRC,这是针对Opera 6的一些特殊情况。


-

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



Not usually needed. IIRC, that was for Opera 6 on some special cases.

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


这篇关于字体大小调整问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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