Home >Web Front-end >HTML Tutorial >Please tell me about the compatibility issue of a li under IE_html/css_WEB-ITnose

Please tell me about the compatibility issue of a li under IE_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 12:23:271126browse

html css ie compatible

Today I encountered an IE compatibility issue, the code is as follows
                <ul class="selectionblock">                    <li>第一级别</li>                    <li class="selected">第二级别</li>                    <li>第三级别</li>                </ul>

ol, ul {    list-style: none;    margin:0;    padding:0;}li {    display: list-item;}ul.selectionblock li {    font-family:"微软雅黑", "Microsoft Yahei", 'Segoe UI', 'Open Sans', Verdana, Arial, Helvetica, sans-serif;    font-weight: 400;    font-size: 9pt;    min-width: 50px;    min-height: 25px;    height: 25px;    background-color: #9CC4E4;    border: 1px transparent solid;    color: #353535;    margin:0;    border-raduis: 0;    display: block;    margin:0;    float:left;    text-align: center;    vertical-align: middle;    cursor: pointer;    padding: 4px 10px;    position: relative;    *font-size:13px;    *height:auto!important;    *vertical-align:bottom;    overflow:hidden;}ul.selectionblock li.selected {    background-color:#F26C4F;    color:white;    height:29px;    top:-2px;}

The displayed result is as follows,

How do you solve it?

Reply to discussion (solution)

First of all, your code seems a bit messy.
I don’t know what effect you want. Are you talking about the white border and height problem of IE7?

If so, please delete the following code:
border: 1px transparent solid; //Border is set to be transparent and it also occupies the position
*height:auto!important; //This sentence is recognized by IE7, Therefore, the height:29px; set later is invalid.

If not, please explain it again.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn