如何设置< h:outputText>的宽度; JSF2.0? [英] How to set the width of <h:outputText> of JSF2.0?
本文介绍了如何设置< h:outputText>的宽度; JSF2.0?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
代码:
<div>
<h:outputText value="DelivertyType: " style="width:135px"/>
<h:inputText value="#{newConsign.consign.faId}" style="width:135px"/>
</div>
h:outputText的样式="width:135px"不起作用.
The style="width:135px" for h:outputText doesn't work.
推荐答案
outputText将生成如下所示的跨度:
The outputText will generate the a span like this :
<span style="width: 135px;">DelivertyType:</span>
宽度"属性不能应用于SPAN等内联元素. (仅适用于块样式元素).
The "width" attribute cannot be applied on in-line elements like SPAN. (can only be applied to block-style elements).
尝试将outputText包装在div中,然后将样式应用于DIV.
Try wrapping the outputText in a div, and apply the styling on the DIV.
这篇关于如何设置< h:outputText>的宽度; JSF2.0?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文