边距和填充属性 [英] Margin and Padding Properties

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

问题描述

我在填充和边距属性方面遇到了麻烦。对于填充和带有边距属性的Netscape,IE往往会更高兴。


所以我试过这个:


< link href =" netscape-styles.css"的rel ="样式表" type =" text / css">


< style type =" text / css">

@import url(ie-styles .css);

< / style>


但它不起作用。它实际上使两个浏览器显示的东西相同,但它仍然是错误的。有什么想法吗?

I''m having trouble with the padding and margin properties. IE tends to be
happier with the padding and Netscape with the margin property.

So I tried this:

<link href="netscape-styles.css" rel="stylesheet" type="text/css">

<style type="text/css">
@import url(ie-styles.css);
</style>

But it doesn''t work. It actually makes both browsers display things the
same but it''s still wrong. Any thoughts?

推荐答案

多伦多网页设计师写道:
Toronto Web Designer wrote:
我在填充和边距属性方面遇到了麻烦。使用填充和带有边距属性的Netscape,IE往往更快乐。

所以我尝试了这个:

< link href =" netscape-styles的CSS"的rel ="样式表" type =" text / css">

< style type =" text / css">
@import url(ie-styles.css);
< / style>

但它不起作用。它实际上使两个浏览器显示的东西相同,但它仍然是错误的。有什么想法吗?
I''m having trouble with the padding and margin properties. IE tends to be
happier with the padding and Netscape with the margin property.

So I tried this:

<link href="netscape-styles.css" rel="stylesheet" type="text/css">

<style type="text/css">
@import url(ie-styles.css);
</style>

But it doesn''t work. It actually makes both browsers display things the
same but it''s still wrong. Any thoughts?



@import适用于两种浏览器。只有NN4(但这是一个旧的,不会

导入这个)。你最好在你的页面上发布关于

填充/边距的问题,以便使用这样的工作。


-
http://www.archytas.nl/

webdesign,internet applicaties,internetgestuurde elektronica


@import works in both browsers. Only NN4 (but that is an old one, won''t
import this). You''d better post your page with the question concerning
the padding/margin in case of using such a work around.

--
http://www.archytas.nl/
webdesign, internet applicaties, internetgestuurde elektronica


" Toronto Web Designer" <到**************** @ yahoo.ca.invalid>写道:
"Toronto Web Designer" <to****************@yahoo.ca.invalid> wrote:
我遇到填充和边距属性的问题。对于填充和Netscape以及margin属性,IE往往更快乐。


哪个版本的IE和Netscape?你有什么问题?

所以我试过这个:

< link href =" netscape-styles.css"的rel ="样式表" type =" text / css">

< style type =" text / css">
@import url(ie-styles.css);
< / style>

但它不起作用。


你的意思是浏览器不使用_both_样式表?

这是''作品'的唯一定义,可以给予上面的

代码片段。


一些旧的浏览器(例如Netscape 4.x)不明白

@导入所以使用上面的语法隐藏了第二个样式表来自

这些浏览器。但是所有现代浏览器都会应用两种样式表。

所以如果你想要超越第一个,你需要在第二个中包含明确的

样式。首先。

它实际上使两个浏览器显示相同的东西,但它仍然是错误的。有什么想法?
I''m having trouble with the padding and margin properties. IE tends to be
happier with the padding and Netscape with the margin property.
Which versions of IE and Netscape? What are your exact problems?
So I tried this:

<link href="netscape-styles.css" rel="stylesheet" type="text/css">

<style type="text/css">
@import url(ie-styles.css);
</style>

But it doesn''t work.
You mean the browsers don''t use _both_ stylesheets?
That''s the only definition of ''works'' that can be given to the above
code snippet.

Some older browsers (Netscape 4.x for example) don''t understand
@import so using the above syntax hides the second style sheet from
those browsers. But all modern browsers will apply both stylesheets.
So if you want to over ride the first one you need to include explicit
styles in the second that over ride styles in the first.
It actually makes both browsers display things the
same but it''s still wrong. Any thoughts?




解释实际问题是什么并发布网址。


Steve

-

我的理论给你起见,我的异端邪说你愤怒,

我从不回信,你也不喜欢我的领带。 ; - 医生


Steve Pugh< st *** @ pugh.net> < http://steve.pugh.net/>



Explain what the actual problem is and post a URL.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don''t like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>


Alo,


" Roderik" <毫安** @ roderik.net>在留言中写道

news:40 ********************** @ dreader2.news.tiscal i.nl ...

(snip)
Alo,

"Roderik" <ma**@roderik.net> wrote in message
news:40**********************@dreader2.news.tiscal i.nl...
(snip)
你最好在页面上发布有关
You''d better post your page with the question concerning the



填充/保证金的问题,以防万一一个解决方法。


样本2是预期的演示格式,但在Netscape中看起来并不好看。
http://www.geocities.com/torontowebdesigner/sample2.htm 没有@import


此页面不适用于IE的Netscape
http://www.geocities.com/torontowebdesigner/ 与@import


主要问题是缩进:ol元素和第三个结尾注释

缩进到右边。


CSS验证。 HTML不是。如果它与HTML有关,那么我想知道它,但是如果它没有,我已经知道HTML不是有效的b $ b在这些页面上。


padding/margin in case of using such a work around.

Sample 2 is the intended presentation format but doesn''t look good in
Netscape.
http://www.geocities.com/torontowebdesigner/sample2.htm without @import

This page is not as intended in both Netscape of IE
http://www.geocities.com/torontowebdesigner/ with @import

The main problem is indents: the ol element and the third end note is
indented to the right.

The CSS validates. The HTML doesn''t. If it has to do with the HTML then I
want to know about it but if it doesn''t, I already know that the HTML isn''t
valid on these pages.


这篇关于边距和填充属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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