2011-03-18 87 views
0

例如在我的代碼中,我想覆蓋.ui-widget-header(對於圖像)和.ui-dialog(設置最大寬度)。如何覆蓋特定的jquery類?

但這會影響我的網格。所以,我需要設置用戶界面的東西電網的編程

.ui-dialog 
{ 
width: 650px !important; 
} 

#tabs .ui-widget-header 
{ 
background-image: url('images/menu_bg_right.png'); 
background-repeat: no-repeat; 
/*-- begin IE 7 --7% to left, 30% to 100%;55px to 50px*/ 
background-position: left 100%; 
height: 50px; 
/*-- end IE 7 --*/ 
background-color: Transparent; 
border: none; 
width: 610px; 
float: left; 
} 

圖片(實際):

enter image description here

圖片電網(預計):

enter image description here

謝謝

+0

當你說「這會影響我的網格」時,你能詳細說明一下這意味着什麼以及你在嘗試什麼? – themerlinproject 2011-03-18 06:24:55

回答

1
$("#sometable th").removeClass(".ui-widget-header"); 

這將終止所選元素上的所有UI樣式。

$("#sometable .ui-widget-header").css("background-image", "none"); 

這將刪除背景圖像樣式。

但你可能只是想寫出更好的CSS選擇器是更具體的,甚至可以使用重要的修改:

body #header #my_table th.ui-widget-header { 
    background-image: none !important; 
} 

然後再重複要刪除其他樣式 - 寬度,高度,等等!不清楚你實際想要改變什麼。