Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the width of h:outputLabel

Tags:

css

jsf

facelets

I am having a hard time trying to change the width of my h:outputLabel, but I still could not get it changed.

By using CSS, I can change the color, font, frame, anything but NOT the WIDTH.

Thank you so much.

like image 800
Nhut Le Avatar asked Feb 28 '23 20:02

Nhut Le


1 Answers

The HTML label element which is generated by h:outputLabel is by default displayed as a widthless inline element. You need to set its CSS display property to block to be able to change the width.

E.g.

label {
    display: block;
    width: 150px;
}
like image 157
BalusC Avatar answered Mar 07 '23 09:03

BalusC