Skip to main content
Solved

Replacement for "statictext" which allows for width and wrapping.

  • February 12, 2026
  • 2 replies
  • 0 views

Iain Sharp
Forum|alt.badge.img+5

I have some data held in a field which I am painting on a DSP. 

Currently the field is set to statictext, but if I make the surrounding structure (div etc) have a fixed width, the field contents overflow it. I want to set them to wrap inside the width. 

However, the STATICTEXT field type translates to SPAN, and SPAN does not follow width or word-wrap, what DSP field type can I use doe display only text which follows the wordwrap stuff. 

I tried making the field ‘ATTRIBUTESONLY’ but then the text is not displayed (the ‘static text’ from the HTS is shown instead...) 

Regards, 

Iain

 

Best answer by Michael Taylor

Hi Iain,

The text probably isn’t wrapping, because the element is a <span>, which defaults to display: inline

You can try changing it to:

display: inline-block;
white-space: normal;

This keeps it behaving mostly inline but allows the text to wrap as expected.

Kind regards,
Mike

2 replies

Michael Taylor
Forum|alt.badge.img+2
  • Rocketeer
  • Answer
  • February 12, 2026

Hi Iain,

The text probably isn’t wrapping, because the element is a <span>, which defaults to display: inline

You can try changing it to:

display: inline-block;
white-space: normal;

This keeps it behaving mostly inline but allows the text to wrap as expected.

Kind regards,
Mike


Iain Sharp
Forum|alt.badge.img+5
  • Author
  • Inspiring
  • February 17, 2026

That has done it. Thanks.