字体大小与%问题 [英] font-size with % problem

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

问题描述




我有一个似乎是一个简单的问题,但我无法理解。我需要把一个标题变得很大,所以我使用了字体大小%和它

得到我的标题是我想要的大小,但正好在它之下我想要一个

< HR> ;.

一切正常6.0和Opera但不在Mozilla或

课程N.N.

运行以下I.E.中的代码。然后在Mozilla或N.N.而你

会看到我的< HR>在段落之下太低了在Mozilla或

NN。

我正在练习使用边距,填充和浮动定位元素

(并且避免使用position:absolute for a改变)但是我不能这样工作。

修复必须在上面列出的所有4种主要浏览器中都有效。

< html>

< head>

< / head>

< body>

< p style =" font-size:700%">

段< / p>

< HR>

< p>

这是为测试打字的段落。

< / p>

< /身体>

< / html>


感谢所有


Patrick

解决方案



" Patrick" < VA ****** @ netzero.net>在留言中写道

新闻:a3 ************************** @ posting.google.c om ...

Hi
在IE中运行以下代码然后在Mozilla或N.N.你会看到我的< HR>在段落之下太低了在Mozilla或
NN。




< p style =" font-size:700%; margin-bottom:0">

段< / p>


这应该照顾它。如果您认为

要关闭,请将保证金设置为非零值。


问候,

Jim




" Jim Roberts" < JR ****** @ msn.com>在消息中写道

< p style =" font-size:700%; margin-bottom:0">
段落< / p>


将其更改为''margin:0''。我试过了两个但发布了错误的修复。


问候,

吉姆



va******@netzero.net (Patrick)写道:
< blockquote class =post_quotes>需要使标题真正大,所以我使用了字体大小%和它
得到我的标题是我想要的大小,但在它下面我想要一个
< HR>。
在IE中一切正常6.0和Opera但不在Mozilla或
当然N.N.
运行下面的代码在I.E.然后在Mozilla或N.N.你会看到我的< HR>在段落之下太低了在Mozilla或
NN。

< html>
< head>
< / head>
< body>
< p style =" font-size:700%">
段落< / p>
< HR>
< p>
这是一个为测试键入的段落。
< / p>
< / body>
< / html>




我''有兴趣知道你默认的字体类型和大小,

因为我几天前和Opera 7.23做了类似的事情

字体-sizemaxed out只有超过500%,并且不会得到任何更大的价值。


这不是字体的问题,我可以做得多更大的

通过指定px值而不是%。


哦,是的 - 它的利润率是700%,BTW。到目前为止,你已经看到其他回复说,毫无疑问。


-

Karl Smith。


Hi

I have what seems to be a simple problem but i can''t figure it out. I
need to make a header real big so i used the font-size with % and it
gets my header to be the size i want, but right under it i want a
<HR>.
It all works fine in I.E. 6.0 and Opera but not in Mozilla or of
course N.N.
Run the code below in I.E. and then in either Mozilla or N.N. and you
will see my <HR> being way too low below the "Paragraph" in Mozilla or
N.N..
I was practising positionning elements using margin, padding and float
only (And avoiding using position: absolute for a change) but i can''t
get that to work.
The fix will have to work in all 4 major browsers listed above.

<html>
<head>
</head>
<body>
<p style="font-size: 700%">
paragraph </p>
<HR>
<p>
This is a paragraph typed for a test.
</p>
</body>
</html>

Thanks to all

Patrick

解决方案


"Patrick" <va******@netzero.net> wrote in message
news:a3**************************@posting.google.c om...

Hi Run the code below in I.E. and then in either Mozilla or N.N. and you
will see my <HR> being way too low below the "Paragraph" in Mozilla or
N.N..



<p style="font-size: 700%;margin-bottom:0">
paragraph </p>

That should take care of it. Set the margin to a non zero value if you think
it''s to close.

Regards,
Jim



"Jim Roberts" <jr******@msn.com> wrote in message

<p style="font-size: 700%;margin-bottom:0">
paragraph </p>


Change that to ''margin:0''. I tried both but posted the wrong fix.

Regards,
Jim



va******@netzero.net (Patrick) wrote:

need to make a header real big so i used the font-size with % and it
gets my header to be the size i want, but right under it i want a
<HR>.
It all works fine in I.E. 6.0 and Opera but not in Mozilla or of
course N.N.
Run the code below in I.E. and then in either Mozilla or N.N. and you
will see my <HR> being way too low below the "Paragraph" in Mozilla or
N.N..

<html>
<head>
</head>
<body>
<p style="font-size: 700%">
paragraph </p>
<HR>
<p>
This is a paragraph typed for a test.
</p>
</body>
</html>



I''d be interested to know what font type and size you have as default,
because I was doing a similar thing a few days ago and in Opera 7.23
the font-size "maxed out" at just over 500% and wouldn''t get any
bigger.

It wasn''t a problem with the font itelf, I could make it much larger
by specifying px values instead of %.

Oh, yeah - it''s the margin being 700% bigger, BTW. By now you''ve
already seen other responses saying that, no doubt.

--
Karl Smith.


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

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