Support Article
Label max-width defined in pzbase-div-layouts causing line break
Summary
When the label on the screen is set to a max-width of 640px. A line break occurs between the lines when the width of the text reaches 640px.

Error Messages
Not Applicable
Steps to Reproduce
- Create an out-of-the-box section.
- Create a dynamic layout
- Add a label control in it.
- Enter some large text in the label.
- Run the case.
Root Cause
The max-width element is hardcoded to 640px. The pzbase-div-layouts rule (Final CSS style sheet) is responsible for the maximum width occupied by the fields.
The max-width element was set to 'fixed' pixels in the Final CSS style sheet (as below).
.content-items-maxwidth .content-label {
max-width:640px;
}
Resolution
This behavior is currently not supported and is scheduled to be supported in a future Pega release.
Perform the following local-change:
Create a class in the UserWorkForm and use it in Cell read-write classes in the label control's Advanced option.
For example: .fullwidth{ max-width:100% !important; }
Note: Apply this change if the label width must be 100% over the application level.
To apply the change for a particular section, create a non-auto generated section with the below code in pzbase-div-layouts,
.content-items-maxwidth .content-label { max-width:none; }
Include this in the section where the label control has 100% layout width.
Published July 23, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.