2013-07-17 57 views

回答

1

您需要爲忽略它使用的樣式類。

添加下面的代碼在XHTML文件

<style type="text/css"> 
/* this is to set proper font size */ 
    .ui-widget,.ui-widget .ui-widget { 
     font-size: 90% !important; 
    } 

    /* To change background color when selectedis-->*/ 
    .ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight 
     { 
     background-color: green; 
    } 
    </style> 

試試這個,它應該工作。

如何找出:

樹上使用Firefox瀏覽器right click並單擊"Inspect Element(Q)"。它將顯示它用於的樣式。它向我展示了上面的標籤,所以我只是重寫它。

你需要了解一點CSS

+0

嘿,你能教我如何找到這個?謝謝! – ethanjyx

+0

我還有一個問題關於treetable的風格... http://stackoverflow.com/questions/17705877/primefaces-treetable-different-background-colors-for-rows-of-different-hierarchy – ethanjyx

+0

看到我更新的答案。 – Makky

相關問題