IE< - > Mozilla让我疯了。 [英] IE <-> Mozilla is driving me insane.

查看:67
本文介绍了IE< - > Mozilla让我疯了。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

原谅我的主题主题的封面方式。

我遇到了两个浏览器处理CSS问题的问题。


这是我在样式表中定义的元素。


===========

sm {

字体:10px arial;

颜色:#53278F;

}

=========== <在mozilla中,我可以在任何地方插入这个标签,而浏览器

可以很好地使用它。 (即< sm>这是文字< / sm>)


IE完全忽略标签。


如果我创建一个元素看起来像这样...


===========

..small {

字体:10px arial;

颜色:#53278F;

}

===========


....然后将其用作div类, IE大多数都是正确的。

(即。< div class =" small">这是文字< / div>


我在做什么什么错误?

这些方法中的一种比其他方法更正确?


我在我的地步想要完全废弃CSS并返回

定义内联字体。至少那时我非常清楚他们将如何渲染



(我甚至不会进入无表格废话。)

pardon the coversational manner of my thread subject.
i''m having issues with the way that the two browsers handle CSS.

this is an element i''ve defined in my style sheet.

===========
sm {
font: 10px arial;
color: #53278F;
}
===========

in mozilla, i can insert this tag anywhere i want, and the browser
renders it fine. (ie. <sm>this is text</sm>)

IE ignores the tag completely.

if i create an element that looks like this...

===========
..small {
font: 10px arial;
color: #53278F;
}
===========

.... and then use it as a "div class," IE mostly gets it right.
(ie. <div class="small">this is text</div>

am i doing something "wrong?"
is one of these methods "more correct" than the other?

i''m at the point where i want to scrap CSS altogether and go back to
defining fonts inline. at least then i had a pretty good idea of how
they would render.
(i won''t even go into the "tableless" nonsense.)

推荐答案

di*@butter.toast.net 写道:
这是我在样式表中定义的元素。
===========
sm {
字体:10px arial;
颜色:#53278F;
}
===== ======
在mozilla中,我可以在任何我想要的地方插入这个标签,并且浏览器
渲染得很好。(即。< sm>这是文字< / sm>)
this is an element i''ve defined in my style sheet.
===========
sm {
font: 10px arial;
color: #53278F;
}
===========
in mozilla, i can insert this tag anywhere i want, and the browser
renders it fine. (ie. <sm>this is text</sm>)

IE ignores the tag completely.



您必须在类名前加一个点(。):。sm。仅IE浏览器

实现了CSS的一部分,其中部分功能很差。


-

jmm dash list(at )sohnen-moe(dot)com

(删除电子邮件的.AXSPAMGN)


You must prepend a dot (".") to the class name: ".sm". IE only
implements a subset of CSS and parts of that are poorly done.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)


di*@butter.toast.net 写道:
请原谅我主题的主题方式。
我有问题的方式这两个浏览器处理CSS。

这是我在样式表中定义的元素。

sm {
字体:10px arial;
颜色:#53278F;
}


HTML中没有sm这样的标签,所以AFAIK你不能设置CSS

属性。 Mozilla接受了它,但我不知道为什么。

如果我创建一个看起来像这样的元素......

.small {
字体: 10px arial;
颜色:#53278F;
}

...然后将其用作div类, IE大多是正确的。
(即。< div class =" small">这是文字< / div>
pardon the coversational manner of my thread subject.
i''m having issues with the way that the two browsers handle CSS.

this is an element i''ve defined in my style sheet.

sm {
font: 10px arial;
color: #53278F;
}
There is no such tag as ''sm'' in HTML, so AFAIK you can''t set CSS
properties for it. Mozilla accepts it, but I don''t know why.
if i create an element that looks like this...

.small {
font: 10px arial;
color: #53278F;
}

... and then use it as a "div class," IE mostly gets it right.
(ie. <div class="small">this is text</div>




而不是使用:


字体:10px arial;


我建议您使用:


字体-size:10px; font-family:Arial,sans-serif;


因为我好像记得有些旧浏览器不能处理第一个




你说IE大部分都是正确的:请更具体一点;用一个URL给出一个

的例子。



Instead of using:

font: 10px arial;

I would suggest that you use:

font-size:10px; font-family:Arial, sans-serif;

since I seem to remember that some older browsers don''t handle the first
as well.

You say "IE mostly gets it right": please be more specific; give an
example with a URL.


di*@butter.toast.net 写道:
di*@butter.toast.net wrote:
这是我在样式表中定义的元素。

sm {
字体:10px arial;
颜色:#53278F;
渲染得很好。(即。< sm>这是文字< / sm>)


这是HTML还是XML文档?

你不能随心所欲地发明HTML元素。


为什么发明一个< sm>当< small>时的元素元素已经存在,

不被弃用,可以通过你的

样式表轻松获得上述样式吗?

IE忽略标签如果我创建一个看起来像这样的元素......

.small {
字体:10px arial;
颜色:#53278F ;
}

...然后将其用作div类, IE大多是正确的。
(即。< div class =" small">这是文字< / div>


IE如何才能获得它? ;大多数是对吧?IE出错了什么?

我做了什么错误?


使用px进行字体大小。

设置特定字体系列而不设置通用族。

设置颜色而不设置背景颜色。

使用引用什么的类名这个类似乎比它的b $ b更好。

这些方法中的一个比其他方法更正确?


第二种方法是少不正确。

我想要完全废弃CSS并返回
定义内联字体。至少我是我们很清楚他们会如何渲染。
(我甚至不会进入无表情的废话。)
this is an element i''ve defined in my style sheet.

sm {
font: 10px arial;
color: #53278F;
}

in mozilla, i can insert this tag anywhere i want, and the browser
renders it fine. (ie. <sm>this is text</sm>)
Is this an HTML or an XML document?
You can''t just invent HTML elements at your whim.

And why invent a <sm> element when the <small> element already exists,
isn''t deprecated and could easily be given the above styles by your
style sheet?
IE ignores the tag completely.

if i create an element that looks like this...

.small {
font: 10px arial;
color: #53278F;
}

... and then use it as a "div class," IE mostly gets it right.
(ie. <div class="small">this is text</div>
How does IE only get it "mostly" right? What does IE get wrong?
am i doing something "wrong?"
Using px for font sizes.
Setting a specific font-family without setting a generic family.
Setting a colour without setting a background colour.
Using a class name that refers to what the class looks like rather
than what it is.
is one of these methods "more correct" than the other?
The second method is "less incorrect".
i''m at the point where i want to scrap CSS altogether and go back to
defining fonts inline. at least then i had a pretty good idea of how
they would render.
(i won''t even go into the "tableless" nonsense.)




好的,我们不会去帮助你。


史蒂夫


-

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

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


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



Okay, we won''t go into helping you.

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/>


这篇关于IE&lt; - &gt; Mozilla让我疯了。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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