开发者

How to set the <td> width of h:selectOneRadio

开发者 https://www.devze.com 2022-12-21 00:22 出处:网络
http://www.jsftoolbox.com/documentation/help/12-TagReference/html/h_selectOneRadio.html How to set thewidth of h:selectOneRadio using the styleClass attribute, I would like to enforce a similar width

http://www.jsftoolbox.com/documentation/help/12-TagReference/html/h_selectOneRadio.html

How to set the width of h:selectOneRadio using the styleClass attribute, I would like to enforce a similar width for all elements within the above 开发者_高级运维radio button group.


Imagine that you have this kind of code:

<h:form id="foo">
    <h:selectOneRadio id="bar" value="#{...}">
        ...
    </h:selectOneRadio>
    ...

Then, in your CSS, you can try to do that:

table#foo\:bar > td {
    width: 42px;
}

or

table#foo\:bar > tr > td {
    width: 42px;
}

or

table#foo\:bar td {
    width: 42px;
}

(I don't remember exactly how the parent relationship in CSS work, that's why I suggest these three examples)

In CSS, it means affect a 42px width to all elements <td> that have a <tr> parent, which have a <table> parent with the ID foo:bar

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号