簡體   English   中英

HTMLTabs CSS可在Firefox和Chrome中使用,但不能在Internet Explorer中使用

[英]HTMLTabs CSS working in firefox and chrome but not in internet explorer

我有一個html標簽CSS,它可以在Chrome和Firefox中正確顯示,但不能在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>​

jsfiddle.net演示

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

在您的html腳本中包括以上DOCTYPE聲明。

我遇到了同樣的問題,並在閱讀此文件后將字體大小設置為小來解決。 奇怪的!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM