Internet Explorer不会隐藏嵌套段落 [英] Internet Explorer won't hide nested paragraphs

查看:73
本文介绍了Internet Explorer不会隐藏嵌套段落的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


在我的网站上,我有一段代码类似于以下内容:


< p id =" ;齿轮" style =" display:none;">

< p> test< / p>

< / p>


这在Firefox中呈现得很好(也就是说,没有显示任何内容)。

但是,在Internet Explorer中,test还在打印。看来

内部< pdoes没有继承display:none;"物业或

somesuch。有没有办法强制IE隐藏嵌套的段落

而无需特别指定display:none;在每一个人中?

Hi all,

On my site I have a section of code that resembles the following:

<p id="gear" style="display: none;">
<p>test</p>
</p>

This renders fine in Firefox (that is, nothing is displayed).
However, in Internet Explorer, "test" is still printed. It appears
that the inner <pdoes not inherit the "display: none;" property or
somesuch. Is there a way to force IE to hide the nested paragraphs
without specifically specifying "display: none;" in every single one?

推荐答案

3月11日,下午7:12,danep < danepow ... @ gmail.comwrote:
On Mar 11, 7:12 pm, "danep" <danepow...@gmail.comwrote:

大家好,


在我的网站上我有一段代码类似于以下内容:


< p id =" gear" style =" display:none;">

< p> test< / p>

< / p>


这在Firefox中呈现得很好(也就是说,没有显示任何内容)。

但是,在Internet Explorer中,test还在打印。看来

内部< pdoes没有继承display:none;"物业或

somesuch。有没有办法强制IE隐藏嵌套的段落

而无需特别指定display:none;在每一个?
Hi all,

On my site I have a section of code that resembles the following:

<p id="gear" style="display: none;">
<p>test</p>
</p>

This renders fine in Firefox (that is, nothing is displayed).
However, in Internet Explorer, "test" is still printed. It appears
that the inner <pdoes not inherit the "display: none;" property or
somesuch. Is there a way to force IE to hide the nested paragraphs
without specifically specifying "display: none;" in every single one?



你不能嵌套段落:每个P元素最终会议结束

< / ptag或者遇到任何其他块的开始标记元素

包括另一个P - 无论先出现什么。这种行为按设计

和标准。如果你真的需要嵌套块元素,不要使用

P,使用其他元素 - 比如说DIV。

You cannot nest paragraphs: each P element ends up by meeting closing
</ptag or by meeting opening tag of any other block element
including another P - whatever comes first. This behavior by design
and by standards. If you really need to nest block elements, don''t use
P, use other elements - say DIV.


在3月11日上午11:26,VK < schools_r ... @ yahoo.comwrote:
On Mar 11, 11:26 am, "VK" <schools_r...@yahoo.comwrote:

3月11日,晚上7:12,danep < danepow ... @ gmail.comwrote:
On Mar 11, 7:12 pm, "danep" <danepow...@gmail.comwrote:

大家好,
Hi all,


在我的网站上,我有一段代码类似于以下内容:
On my site I have a section of code that resembles the following:


< p id =" gear" style =" display:none;">

< p> test< / p>

< / p>
<p id="gear" style="display: none;">
<p>test</p>
</p>


这在Firefox中呈现得很好(也就是说,没有显示任何内容)。

但是,在Internet Explorer中,试验"还在打印。看来

内部< pdoes没有继承display:none;"物业或

somesuch。有没有办法强制IE隐藏嵌套的段落

而无需特别指定display:none;在每一个?
This renders fine in Firefox (that is, nothing is displayed).
However, in Internet Explorer, "test" is still printed. It appears
that the inner <pdoes not inherit the "display: none;" property or
somesuch. Is there a way to force IE to hide the nested paragraphs
without specifically specifying "display: none;" in every single one?



你不能嵌套段落:每个P元素最终会议结束

< / ptag或者遇到任何其他块的开始标记元素

包括另一个P - 无论先出现什么。这种行为按设计

和标准。如果你真的需要嵌套块元素,不要使用

P,使用其他元素 - 比如说DIV。


You cannot nest paragraphs: each P element ends up by meeting closing
</ptag or by meeting opening tag of any other block element
including another P - whatever comes first. This behavior by design
and by standards. If you really need to nest block elements, don''t use
P, use other elements - say DIV.



谢谢,我将外部的一个改为DIV并且它可以解决问题,但是需要重写很多CSS。很奇怪,如果你说的是真的那么,

一旦IE符合标准并且FF不符合。

Thanks, I changed the outer one to a DIV and it does the trick, though
it required rewriting a lot of CSS. Strange, if what you say is true,
that for once IE conforms to standards and FF doesn''t.


danep schreef:
danep schreef:

大家好,


在我的网站上,我有一段类似于以下内容的代码: />

< p id =" gear" style =" display:none;">

< p> test< / p>

< / p>


这在Firefox中呈现得很好(也就是说,没有显示任何内容)。

但是,在Internet Explorer中,test还在打印。看来

内部< pdoes没有继承display:none;"物业或

somesuch。有没有办法强制IE隐藏嵌套的段落

而无需特别指定display:none;在每一个?
Hi all,

On my site I have a section of code that resembles the following:

<p id="gear" style="display: none;">
<p>test</p>
</p>

This renders fine in Firefox (that is, nothing is displayed).
However, in Internet Explorer, "test" is still printed. It appears
that the inner <pdoes not inherit the "display: none;" property or
somesuch. Is there a way to force IE to hide the nested paragraphs
without specifically specifying "display: none;" in every single one?



当我在家里尝试这个时,

使用Firefox,

单词测试仍然显示


-

Rob Waaijenberg

When I try this at home,
using Firefox,
the word test is still displayed

--
Rob Waaijenberg


这篇关于Internet Explorer不会隐藏嵌套段落的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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