user2243357 user2243357 - 1 year ago 121
CSS Question

Justify Paragraph Text HTML

How would one justify this text??
I have tried and searched for days to get something so simple to work..



<div id="justify">
<p>I just want this to justify..</p>


#justify {
width: 100%;
background: #D33;

#justify p {
margin: 0 auto;
max-width: 70%;
list-style: disc outside none;
text-align: justify;
display: list-item;
background: #ccc;

Here on JSFiddle:

Any help would be much appreciated.

Answer Source
#justify p:after {
  content: "";
  display: inline-block;
  width: 100%;

Through some HTML Trickery, this should work. I found it on a blog post ages ago when I had a similar problem. Check it out on the JSFiddle

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download