Search code examples
htmljustify

HTML align justify: width parameter?


I am working in an environment where I can only edit a text-string. I can use xhtml in the text string, but have no access to css or any other layers. (I'm a hobbyist)

Inside a large box (800px wide) I want a smaller justified text (350px wide)

My attempt: <p width="350px" align="justify">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architec</p>

Doesn't work. The paragraph tag works. Justify works, but to the full width. Width in pixels, percent or absolute numbers doesn't work.

Any tips / workarounds?

Thanks.


Solution

  • Try to

    <p style="width:350px; text-align:justify;">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architec</p>