Search code examples
htmlstylesword-wrap

Get HTML Style to work with multiple lines of read-only data


I'm using the following HTML to customize data fields displayed on a screen:

<a style="text-decoration-line:none;text-align:left;background:bisque;padding-right:45px;">

This works as expected for data fields that are displayed on a single line. However, when I encounter a field that would result in multiple lines of data, the Style doesn't work. a rectangle of the bisque background appears before or after the large data fields, but their background is white. How do I alter this Style statement to accommodate large fields which will wrap the data? This is a read-only screen, so the tag doesn't work for me. Thanks for looking at this


Solution

  • If you're using HTML5 this should work :

        <a style="text-decoration:none;">
        <div style="text-align:left;background:bisque;padding-right:45px;">
        Your multiline data here...
        </div>
        </a>