2012-07-09 122 views
0

我目前正在爲jQuery UI標籤的CSS佈局掙扎。我使用了兩個css,第一個css,我最初放在一起,以獲得我想要的標籤(請參閱圖2)。第二個名爲jquery-ui-1.8rc2.custom.css的css被添加用於我在我的網頁上使用的警報對話框。現在,如果我使用它們兩個CSS的標籤將不成比例(看圖2)。jquery-ui選項卡的CSS問題

如何避免/繞過/ sovle我目前正在進行的這個CSS問題?

的標籤CSS的前景,我想: enter image description here

的標籤CSS前景的jQuery-UI-1.8rc2.custom.css distortioned: enter image description here

在我的網站

警告框使用jQuery的UI -1.8rc2.custom.css:

enter image description here

編輯:

這是我tabs.css

<style> 

#page-wrap       { width: 615px; background:#FFF; margin: 10px auto; margin: 0; padding: 0; } 



.ui-tabs       { zoom: 1;} 
.ui-tabs .ui-tabs-nav    { list-style: none; position: relative; overflow:hidden; 
             z-index: 1000; background: #EBEBEB; margin: 0; padding: 0;} 


.ui-tabs .ui-tabs-nav li   { position: relative; float: left; 
             border-bottom-width: 0 !important; margin: 0 0px -1px 0; background: #EBEBEB;} 
.ui-tabs .ui-tabs-nav li a   { float: left; text-decoration: none; padding: 5px 10px ; outline: medium none; font-weight: bold; font-size:11px; line-height: 
30px;} 
.ui-tabs .ui-tabs-nav 
li.ui-tabs-selected     { border-bottom-width: 0; background: #F9AE5C; border-top:1px solid #D4D4D4; border-left:1px solid #D4D4D4; border-right:1px solid #D4D4D4; border-bottom:1px solid #FFF; } 
.ui-tabs .ui-tabs-nav 
li.ui-tabs-selected a, .ui-tabs 
.ui-tabs-nav li.ui-state-disabled a, 
.ui-tabs .ui-tabs-nav 
li.ui-state-processing a   { cursor: text; } 
.ui-tabs .ui-tabs-nav li a, 
.ui-tabs.ui-tabs-collapsible 
.ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; color: #222222; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 
.ui-tabs .ui-tabs-panel    { padding: 20px; display: block; border-width: 0; background: none; 
             position: relative; min-height: 100px; border: 1px solid #D4D4D4; } 
.ui-tabs .ui-tabs-hide    { display: none !important; margin: 0; padding: 0;} 
.pngIcon{ padding:0px 5px 0px 5px; vertical-align:bottom;} 


a.mover        { background: #900; padding: 6px 12px; position: absolute; 
             color: white; font-weight: bold; text-decoration: none; } 
.next-tab       { bottom: 0; right: 0; -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px; border-top-left-radius: 10px; } 
.prev-tab       { bottom: 0; left: 0; -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px; border-top-right-radius: 10px; } 
</style> 

對於jQuery的UI-1.8rc2.custom.css這裏是LINK

+0

你有一些我們可以看看的代碼嗎? – 2012-07-09 22:57:07

+0

@Sean,我已經添加了我的tab.css代碼 – techAddict82 2012-07-09 23:03:12

回答

1

我敢打賭,如果.custom.css是覆蓋你的.css規則,你在head部分中調用.custom.css樣式表第二個。首先調用custom.css,然後調用你的第二個。稍後調用.css文件應該覆蓋樣式表之間重複的任何規則。與多個樣式表相關的研究「特異性」。

+0

謝謝你,我在你的答案中提到了這個術語,並找到了有用的解決方案。 – techAddict82 2012-07-10 00:34:51