When collaborating with designers, they often have strong opinions about word wrapping in the final HTML page. If I am working on a fixed layout (non-responsive) and the designer is not satisfied with how the text wraps, there are several options available:
- Adjust the
padding-right
- Insert manual line breaks using
<br>
- Add non-breaking spaces using
to prevent breaking lines (especially for orphan control)
In my situation, I am designing for a specific mobile device so I have knowledge of the screen size and ability to manipulate fonts. Meeting the satisfaction of the designers is crucial.
A recurring problem arises when the text or layout is updated later on, and remnants of the previous word wrap concerns cause issues that require fixing.
I am seeking suggestions for a strategy that:
- Allows for complete and specific control over word wrapping as needed;
- Does not complicate maintenance in the future
I am open to procedural, algorithmic (JavaScript), or CSS-based recommendations to address this challenge.