【问题标题】:rich:comboBox button location丰富:组合框按钮位置
【发布时间】:2011-07-15 14:28:09
【问题描述】:

如何控制rich:combobox下拉按钮的位置? 默认情况下,它位于文本元素的右侧。我希望它位于文本元素的左侧。

【问题讨论】:

    标签: css jsf richfaces


    【解决方案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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-31
      • 2011-11-29
      • 2011-03-10
      • 2021-08-16
      • 1970-01-01
      • 2012-07-30
      • 2023-04-08
      • 1970-01-01
      相关资源
      最近更新 更多