我有一个HTML选项卡CSS,它可以在Chrome和Firefox中正确显示,但不能在Internet Explorer中显示。这里HTMLTabs CSS在Firefox和Chrome中工作,但不在Internet Explorer中
问题是,li
与内容结合点分离,并在Internet Explorer
CSS是不加入:
#header ul {
list-style: none;
padding: 0;
margin: 0;
}
#header li {
float: left;
font: 10px arial,sans-serif;
border: 1px solid #bbb;
border-bottom-width: 0;
margin: 0;
}
#header a {
text-decoration: none;
display: block;
background: #eee;
padding: 0.24em 1em;
color: #00c;
width: 8em;
text-align: center;
}
#header a:hover {
background: #ddf;
}
#header #selected {
border-color: black;
}
#header #selected a {
position: relative;
top: 1px;
background: white;
color: black;
font-weight: bold;
}
#content {
border: 1px solid black;
clear: both;
padding: 0 1em;
}
HTML:
<div id="tabs">
<div id="header">
<ul>
<li name_id="tab1" id="selected">
<a name="" type="hyperlink" href="#">tab1</a>
</li>
<li name_id="tab2">
<a name="" type="hyperlink" href="#">tab2</a>
</li>
</ul>
</div>
<div id="content">
<div id="table-wrapper">
<div id="table-scroll">
<table width="100%">
<tbody>
<tr>
<td>
<a href="#">Test Value 1</a>
</td>
</tr>
<tr>
<td>
<a href="#">Test Value 2</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
同样的问题我:P – bungdito
你可以尝试添加CSS复位第一:http://meyerweb.com/eric/tools/css/reset/ –
@bungdito看看杰塞尔的下面,它帮助 –