2011-03-15 86 views
0

如何控制rich:combobox下拉按鈕的位置? 默認情況下,它位於文本元素的右側。我希望它位於文本元素的左側。rich:comboBox按鈕位置

回答

1

您可以參考官方文檔,查看哪些樣式類名稱可用於定製<rich:combobox>http://docs.jboss.org/richfaces/latest_3_3_X/en/devguide/html/rich_comboBox.html

我嘗試使用此設置和下拉按鈕位於現在左側:

<rich:comboBox> 
       <f:selectItem itemValue="suggestion 1"/> 
       <f:selectItem itemValue="suggestion 2"/> 
       <f:selectItem itemValue="suggestion 3"/> 
       <f:selectItem itemValue="suggestion 4"/> 
       <f:selectItem itemValue="suggestion 5"/> 
    </rich:comboBox> 

,並在頁面聲明這種風格:

<style type="text/css"> 
input.rich-combobox-button, input.rich-combobox-button-inactive, input.rich-combobox-button-disabled{ 
     left:0px; 
} 

.rich-combobox-input, .rich-combobox-input-disabled, .rich-combobox-input-inactive{ 
font-weight:bold; 
     text-align:center; 
} 
</style> 

enter image description here

+0

謝謝。這很有幫助! – Benchik 2011-03-15 11:21:18