以orbeon形式挣扎到风格领域

时间:2017-05-30 14:13:45

标签: css styling orbeon xforms

我对Orbeon和Xforms很陌生,对CSS有点生疏......

我正在尝试减少orbeon上输入字段(即框)的大小。我通过添加:

来控制和style.css之间的联系
<xh:style type="text/css">
    .short-field {width:25px;}
</xh:style> 

然后:

<xf:input class="short-field" id="control-4-control" bind="control-4-bind">
    <xf:label ref="$form-resources/control-4/label"/>
    <xf:hint ref="$form-resources/control-4/hint"/>
    <xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>

当我运行表单时,字段大小不会改变,但通过检查代码并改变宽度:25px;颜色:红色;它使文本变红,所以我知道它的工作在某种程度上,我只是不能让它改变盒子的大小!

1 个答案:

答案 0 :(得分:0)

而不是.short-field {width:25px;},请尝试.short-field input {width:25px;}。这是因为对于所有XForms控件,在发送到浏览器的HTML标记中有一个包含元素,包装实际的HTML输入,字段标签等。