2014-02-26 38 views
0

我很新的CSS,并没有太多的设计师,但我试图将它添加到我做的一些JSF无线电选择项目,但我不明白我需要。排列与CSS的无线电项目

我试图让他们出现在每个项目的平均漂亮,所有三个其中相当多的是这样的:

<h:selectOneRadio type="reset" id="SelectNativity" value="#{searchBean.nativity}" rendered="#{searchBean.byNativity}" styleClass="searchByOtherRadio"> 
<f:selectItem itemValue="1" itemLabel="Native"><br/></f:selectItem> 
<f:selectItem itemValue="2" itemLabel="Nonnative"></f:selectItem> 
<f:selectItem itemValue="3" itemLabel="Both Native and Nonnative in parts of its US range"></f:selectItem> 
</h:selectOneRadio> 

和CSS是这样的:

.searchByOtherRadio{ 
    font-family: Verdana; 
    font-size: small; 
    color: #000; 
    padding-left:20px; 
    width: 75%;} 

基本上,我怎么能得到诞生之下的第二个项目接近第一个,我怎样才能获得侵入性和联邦法律地位的第二个项目排列在耶稣诞生第二个项目,使用CSS?

谢谢。

回答

4

使用layout属性上的文字h:selectOneRadiopageDirection,无需CSS后。

存在用于layout 2个可能的值:

  • lineDirection - 对于水平方向
  • pageDirection - 对于垂直方向。

默认值为lineDirection

<h:selectOneRadio layout="pageDirection" type="reset" id="SelectNativity" styleClass="searchByOtherRadio"> 
    <f:selectItem itemValue="1" itemLabel="Native"></f:selectItem> 
    <f:selectItem itemValue="2" itemLabel="Nonnative"></f:selectItem> 
    <f:selectItem itemValue="3" itemLabel="Both Native and Nonnative in parts of its US range"></f:selectItem> 
</h:selectOneRadio> 
0

所以我能够加入到这样做:

display: block;到我张贴的CSS。

并多次&nbsp;ItemLabel="XYZ"