I use Hotdog as an editor, and I've used the "Justify" alignment tags around type, but nothing happens. In otherwords, I'm not sure the tags work period. Most everyone still uses flush left, which is fine, but there are some things I'd like justified in my work. Can anyone tell me what the scoop is on this.
Thanks, BuddyB

Dani AI

Generated

Good concise replies from and , and a practical real-world note from about email markup. The thread covers the basic "how", so the following focuses on why justification sometimes appears to fail, and on practical ways to get usable justified text without harming readability.

Common causes when justification seems to “do nothing”: the paragraph only has a short last line (nothing to stretch), the element isn’t treated as a block, a more specific CSS rule is overriding the style, or an email client rewrites/inlines markup. Troubleshooting steps: verify the element’s computed styles in a browser inspector, test with realistic paragraph text and a defined container width, and check for external rules with higher specificity.

Maintenance and quality tips: separate presentation from markup (use a class in a stylesheet rather than repeatedly inlining styles). Enable controlled hyphenation and control the last-line behavior to avoid huge word gaps. A compact CSS example to try (adjust values to taste and test across browsers):

.justified-copy {
  text-align: justify;
  hyphens: auto;           /* allow hyphenation to reduce gaps */
  text-align-last: left;   /* keep the final line ragged for readability */
  word-spacing: normal;    /* tweak only when necessary */
}

/* optional trick: forces the last line to justify (test for side effects) */
.justified-copy::after {
  content: "";
  display: inline-block;
  width: 100%;
  height: 0;
}

Design guidance: full justification is best for print-like blocks or wide columns. For long body copy on the web, flush-left usually reads better because justification creates uneven word spacing and "rivers." For HTML email, expect inconsistent support—inline styles and extensive client testing are required. Overall, prefer semantic markup, test with real content, and measure legibility on multiple widths and devices before committing to justified body text.

Recommended Answers

All 8 Replies

You can just add a style attribute to your <p> tag like this:

<p style="text-align: justify"> Text here </p>

That will justify your paragraph. Let me know if you need more help.

you can also use left/right/center instead of justify.

The way I usderstand it, he would like both the right and left edges to be justified. Left leaves the the right side unjustified, right leaves the left side unjustified and center leaves both unjustified. The justified attribute will make both edges "smooth" or justified.

you can also use left/right/center instead of justify.

yeah I was just increasing his general knowledge of css ;)

What a great place to hang out :cheesy: . Jason, thanks for that input. I was fiddling around and discovered the <DIV></DIV> tag works the same way. I say fiddling, what really happened was I was sending email justified and looked at the source. This is the way OE does it. So, now I know there's more than one way to skin that proverbial cat. I want you to know I really appreciate you guys, this has been one of the most helpful places I've ever subscribed to.
BuddyB

I should have looked at your previous posts in other CSS realted threads... Just thought you were confused... Sorry... :o

yeah I was just increasing his general knowledge of css ;)

No Problem. Just a little bit of advice... It you are creating a paragraph use the <p></p> tags, it will degrade better than div tags in older browsers. Save <div></div> for containers. Take it for what it is worth... :)

What a great place to hang out :cheesy: . Jason, thanks for that input. I was fiddling around and discovered the <DIV></DIV> tag works the same way. I say fiddling, what really happened was I was sending email justified and looked at the source. This is the way OE does it. So, now I know there's more than one way to skin that proverbial cat. I want you to know I really appreciate you guys, this has been one of the most helpful places I've ever subscribed to.
BuddyB

I should have looked at your previous posts in other CSS realted threads... Just thought you were confused... Sorry... :o

lol what can I say? my favourite passtime... :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.