2012-07-10 118 views
0

我想实现下面来看一下:http://www.primefaces.org/showcase/ui/selectManyCheckbox.jsf摆脱边框的周围号码:selectManyCheckBox

通知有分量周围没有CSS-边界在PrimeFaces展示网站。

<h:outputText value="Horizontal: " /> 
<p:selectManyCheckbox value="#{formBean.selectedOptions}"> 
    <f:selectItem itemLabel="Option 1" itemValue="Option 1" /> 
    <f:selectItem itemLabel="Option 2" itemValue="Option 2" /> 
    <f:selectItem itemLabel="Option 3" itemValue="Option 3" /> 
</p:selectManyCheckbox> 

但是,在我的实现中,我在组件周围有不需要的边框。我曾尝试添加style =“border-style:none;”即

<p:selectManyCheckbox value="#{formBean.selectedOptions}" style="border-style: none;">  

没有任何结果。我有一个default.css文件依据:

.ui-widget, .ui-widget .ui-widget { 
    font-size: 80% !important; 
} 

我不认为CSS的资源将在这个问题上有任何影响,但我可能是错的。

我看不到差异浏览器之间的任何区别。

你能告诉我为什么我有边框,我怎么才能摆脱它们,只有在这个特定的组件?

问候函

+0

既然你不提供任何自己的代码,这是很难帮助你。但猜测会是这个边界:0;有助于。请不要将它放在内联(在元素上),而是放在一个班级中。 – 2012-07-10 19:13:33

+0

您使用的是什么浏览器和浏览器版本号? – BestPractices 2012-07-10 20:09:37

回答

1

边界? Primefaces'p:selectManyCheckbox默认情况下没有边框。

无论如何,如果您想覆盖任何样式规则,您可以使用!important

这应该删除任何边界:

<p:selectManyCheckbox value="#{formBean.selectedOptions}" style="border-style: none !important;"> 
0

我不同意havning没有国界的。我试图删除所有的CSS,但我仍然有边界。可能是主题特定的。

我不得不使用以下命令:

.noBorder tr,.noBorder td { 
    border: none !important; 
} 



<p:selectManyCheckbox value="#{formBean.selectedOptions}" styleClass="noBorder"> 
         <f:selectItem itemLabel="Option 1" itemValue="Option 1" /> 
        </p:selectManyCheckbox>