Css 我的列表项';s子标签元素在IE中消失在手风琴菜单打开时
我有一个应用程序在Chrome和FF中运行得非常完美,然而,当我在IE中查看它时,一切都很好,直到我点击一个标题元素来激活它(jQuery accordion) 然后,我看到内容所在的地方出现了一个短暂的闪光,然后突然整个左列消失了。此列由一个浮动标签元素生成,其类为“.left”,如下所示Css 我的列表项';s子标签元素在IE中消失在手风琴菜单打开时,css,Css,我有一个应用程序在Chrome和FF中运行得非常完美,然而,当我在IE中查看它时,一切都很好,直到我点击一个标题元素来激活它(jQuery accordion) 然后,我看到内容所在的地方出现了一个短暂的闪光,然后突然整个左列消失了。此列由一个浮动标签元素生成,其类为“.left”,如下所示 <ul class="menu collapsible"> <li class='expand sectionTitle'><a href='#'>General Set
<ul class="menu collapsible">
<li class='expand sectionTitle'><a href='#'>General Settings</a>
<ul class='acitem'>
<li class="section">
<label class="left">This item if floated left with a defined width of 190px via css. This is the item that's disappearing after a brief display</label>
<input class="input" value="input element here" />
<label class="description">This element has a margin-left:212px; set via css in order to be positioned to the right of the label element as if in an adjacent table cell. When I add a max-width property to this element, it disappears in IE too!</label>
</li>
</ul>
</li>
</ul>
-
-
如果该项通过css以定义的190px宽度向左浮动,则该项将被删除。这是短暂显示后消失的项目
这个元素有一个左边距:212px;通过css进行设置,以便将其定位到标签元素的右侧,就像在相邻的表单元格中一样。当我向这个元素添加一个max-width属性时,它也会在IE中消失!
从上面代码中的注释(对于两个label元素)可以看到,一旦我在描述标签上设置了max width,它就会消失(我在左侧label元素上没有max width,但它仍然会消失)
这个UL菜单的初始视图很好(注意扩展类声明,它使手风琴的这一部分在启动时打开。直到我单击“常规设置”将其关闭,然后再打开,左类元素才会消失(仅在IE中)这个问题没有答案,但我终于找到了答案。因此,如果其他人对IE7和手风琴菜单有问题,下面是解决方案 我有一个容器div,其位置设置为相对。我必须将position属性更改为“static”,然后绝对地相对于主体定位子元素(相对于容器div) 通过在特定于IE的css前面添加一个* 例如:
.wrapperDiv {
//all browswers except IE
position:relative;
//IE gets this
*position:static;
}
.childDivExample {
//non IE positioning is relative to wrapperDiv
margin-left:20px;
//IE position is relative to the body document
//any property prepended with a "*" is only recognized by IE
enter code here
*position:absolute;
*left:200px;
*top: 100px;
}
这个问题没有答案,但我终于找到了答案。因此,如果其他人对IE7和手风琴菜单有问题,这里有一个解决方案 我有一个容器div,其位置设置为相对。我必须将position属性更改为“static”,然后绝对地相对于主体定位子元素(相对于容器div) 通过在特定于IE的css前面添加一个* 例如:
.wrapperDiv {
//all browswers except IE
position:relative;
//IE gets this
*position:static;
}
.childDivExample {
//non IE positioning is relative to wrapperDiv
margin-left:20px;
//IE position is relative to the body document
//any property prepended with a "*" is only recognized by IE
enter code here
*position:absolute;
*left:200px;
*top: 100px;
}