简体   繁体   English

JQuery UI选项卡 - 选项卡下方没有线条边框

[英]JQuery UI Tabs - No line border below tabs

I can't figure out why any tab selection after the first tab of my JQuery UI set, no line appears underneath. 我无法弄清楚为什么在我的JQuery UI设置的第一个选项卡之后选择任何选项卡,下面没有显示任何行。

Pics: 图片:

http://i54.tinypic.com/adhzsk.jpg

在此输入图像描述

<div id="tabs" style="width:750px;margin: 0 auto;">
        <ul>
        <li><a href="#tabs-1" onClick="$('#newJudgeLink').hide(); $('#newUserLink').hide();">New Reports</a></li>
        <li><a href="#tabs-2" onClick="$('#newJudgeLink').hide(); $('#newUserLink').hide();">Old Reports</a></li>
        <li><a href="#tabs-3" onClick="$('#newJudgeLink').show(); $('#newUserLink').hide();">Judges</a></li>
        <li><a href="#tabs-4" onClick="$('#newJudgeLink').hide(); $('#newUserLink').show();">Users</a></li>
        <li><a href="#tabs-5" onClick="$('#newJudgeLink').hide(); $('#newUserLink').hide();">Other Settings</a></li>
        </ul>

And then each div has 然后每个div都有

 <div id="tabs-1"> <!-- stuff --> </div>
 <div id="tabs-2"> <!-- stuff --> </div>

, etc. And I've double checked and made sure all of the divs are closed. 等我已经仔细检查并确保所有的div都关闭了。 I have no other styling aside from the out-of-the-box JQuery CSS. 除了开箱即用的JQuery CSS,我没有别的风格。

Tabs delaration: 标签delaration:

$('#tabs').tabs();

Any help would be highly appreciated. 任何帮助将受到高度赞赏。

In my case, I put this line in the top of the document and it works fine. 在我的情况下,我把这一行放在文档的顶部,它工作正常。 I only had this problem in IE. 我只在IE中遇到过这个问题。

<!DOCTYPE html>

You need to override the Jquery UI styles in the original style doesn't contain border. 您需要覆盖原始样式中不包含边框的Jquery UI样式

Add this in to your style sheet: 将其添加到样式表中:

.ui-tabs .ui-tabs-nav li { 
    list-style: none; 
    float: left; 
    position: relative; 
    top: 1px; 
    margin: 0 .2em -1px 0; 
    border-bottom: 1px !important; 
    padding: 0; 
    white-space: nowrap;
}

In .ui-tabs .ui-tabs-nav li margin you need to change original 1px into -1px and border-bottom: 0px into border-bottom: 1px; .ui-tabs .ui-tabs-nav li margin你需要将原始1px更改为-1px并将border-bottom: 0px更改为border-bottom: 1px;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM