css“display:table!important”和IE11无法正常工作

时间:2015-04-01 11:51:05

标签: html css

"显示:表格!重要"在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

&#13;
&#13;
.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;}
&#13;
&#13;
&#13;

我在第二个

中添加了display:table!important

1 个答案:

答案 0 :(得分:1)

jMenu是你用过的id 你已经用过了

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

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

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