Toby van Kempen Toby van Kempen - 2 years ago 82
HTML Question

How can I justify text in HTML/CSS?

I made a little text in HTML and it's looking fine, but I want it to be neatly stacked, or neatly aligned. Link one shows what I have right now, and link two shows what I want. Please ignore the red "Verdana".

This is what I have now, and what I don't want:

This is what I don't have yet, but what I want:

My code is as follows:

<div class="left">
<p style="text-align: justify; height: 7px;">&nbsp;</p>

<p style="line-height: 22px; font-size: 10px; font-family: Verdana; ">
<span style="letter-spacing: 1px">Big-ass piece of not-so-interesting text</span>

<p style="line-height: 28px; font-size: 18px; font-family: GillSans-Light; ">
<br>6711 JC EDE
<br>POSTBUS 8193
<br>6710 AD EDE

All help greatly appreciated! Thanks in advance!

Answer Source

You have text-align: justify on an element with no text... try applying it to your actual text and it should work!

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