Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我很难改变我的 h:outputLabel 的宽度,但我仍然无法改变它。
通过使用 CSS,我可以更改颜色、字体、框架,但不能更改宽度。
非常感谢。
生成的 HTMLlabel元素h:outputLabel默认显示为无宽度inline元素。您需要将其 CSSdisplay属性设置block为能够更改宽度。
label
h:outputLabel
inline
display
block
例如
label { display: block; width: 150px; }