html - css "display:table !important"和 IE11 不工作

标签 html css

“display: table !important”在 chrome 中工作正常但在 IE 11 中不工作

寻求解决方案或任何其他类似于替代品的功能

这是 css 和 html 代码的一部分,而不是全部:

       <ul id="jMenu">
                   <li><a href="#" >Educational Services >> </a>    


            <!--------------------------------------------> 
                            <ul style="list-style: none; display:table;  ">

                                <li ><a href="#"  >For Institutions >></a>
                <ul style="list-style: none;  ">
                <li ><a href="#">Application Form</a>
                </li>
                <li ><a href="#" >Photo Gallery</a>
                </li>
                <li ><a href="#"  >Policy</a>
                </li>
                </ul></li>


            <!------------------------------------------>   

                <li ><a href="#"  >For Librarians >> </a>
                <ul style="list-style: none; ">
                <li ><a href="#" >BA International Librarianship Training Program</a>
                </li>
                <li ><a href="#" >Online Courses >> </a>
                <ul style="list-style: none; "><li ><a href="#" >Application Form</a></li>
                <li ><a href="#" >Schedule</a></li>
                <li ><a href="#" >Policy & Online code of ethics</a></li>

                </ul></li>
                <li ><a href="#" >Librarians' Orientation >> </a>
                <ul style="list-style: none; "><li ><a href="#" >Online Survey</a></li>

                </ul></li>

                <li><a href="#" >Internships & Study Visits >></a>
                <ul style="list-style: none; "><li ><a href="#" >Registration Form</a></li>

                </ul></li>  
                </ul></li>

            <!--------------------------------------------> 

                    <li ><a href="#"  >Public programs >> </a>
                    <ul style="list-style: none; "><li ><a href="#"  >Orientations >> </a>
                    <ul style="list-style: none; "><li ><a href="#" >Library Orientation Tour</a></li>
                    <li ><a href="#" >Nobel Section Tour</a></li>
                    <li ><a href="#" >Video orientations, interactive orientations</a></li></ul></li>
                    <li ><a href="#" >Classes >> </a>
                    <ul style="list-style: none; "><li ><a href="#" >IL courses by title</a></li>
                    <li ><a href="#" >DL courses</a></li>
                    <li ><a href="#" >IL courses by title</a></li></ul></li>
                    <li ><a href="#" >Schedule >> </a>
                    <ul style="list-style: none;  "><li ><a href="#"  >Schedule</a></li>

                    </ul></li>
                    <li ><a href="#" >Tutorials</a>
                    </li>
                    <li ><a href="#" >Classes Policy</a>
                    </li>


                </ul></li>      

            <!---------------------------------------------->   
                    </ul>
                   </li>
               </ul>

还有CSS

.jMenu{
display:table;
margin:0;
padding:10px 15px;
list-style:none; 
list-style-type: none;
}
.jMenu li{
display:table-cell;
background-color:#772728;
margin:0;
list-style:none;
list-style-type: none;
}
.jMenu li a{
padding:10px 15px;
display:block;
background-color:transparent;
color:#fff;
text-transform:uppercase;
cursor:pointer;
font-size:20px;
}
.jMenu li a:hover{
background-color:#923031 ;
}
.jMenu li:hover>a{
background-color:#923031 ;
}
.jMenu li ul{ /*display: table  ;*/  
position :absolute;
padding:0;
margin:0;
list-style:none ; 
list-style-type: none;
}
.jMenu li ul li{ 
background-color:#772728;
display:block ;
border-bottom:1px solid #923031;
padding:0;
list-style:none;
list-style-type: none;
 position:relative;
}
.jMenu li ul li a{
font-size:15px;
text-transform:none;
display:block ;
padding:7px;
border-top:1px solid transparent;
border-bottom:1px solid transparent;
}
.jMenu li ul li a.isParent{
background-color:#923031;
}
.jMenu li ul li a:hover{  
background-color:#923031;
border-top:1px solid #772728;
border-bottom:1px solid #772728;
}

.jMenu li ul li ul {display: none;}
.jMenu li ul li ul li {display:block;}
.jMenu li ul li ul li a{display:block;}

我在第二个中添加了 display:table !important

最佳答案

jMenu是你用过的id 你用过

.jMenu li ul{ /*display: table  ;*/  }

在下面使用。并确保正确使用你的选择器

#jMenu li ul{ /*display: table  ;*/  }

关于html - css "display:table !important"和 IE11 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29390050/

相关文章:

HTML 图像 src 区分大小写

html - 折叠框(图像菜单)

css - 如何修改此 Bootstrap 列堆叠行为

html - 如何更改单个表格单元格的宽度 (<td>)

html - Chrome 和 Firefox Bootstrap 导航切换不起作用

javascript - fabricjs 删除背景图片

javascript - 使用 javascript 更改背景颜色会影响 CSS :hover

html - 如何将按钮对齐到文本区域输入的右侧?

javascript - 我必须将闪烁的管道添加到特定的占位符中

javascript - 自动适应动态 div block