Page 1 of 1

Tip . How justified text in X3

Posted: 13 Apr 2015, 15:43
by zuro
Go to your admin panel. Navigate to Custom>CSS
Add this code to your CSS file.
Code
body p,
.sqs-layout .sqs-block.html-block p,
.sqs-layout .sqs-block.markdown-block p {
  text-align: justify;
}
Next go to your folder Page and insert this code to layout or context
Code
text-justify 
Insert text to content.Done !

Re: Tip . How justified text in X3

Posted: 13 Apr 2015, 22:27
by GGANG
@zuro
Do you have a page link URL to take a look?

Re: Tip . How justified text in X3

Posted: 14 Apr 2015, 04:46
by zuro

Re: Tip . How justified text in X3

Posted: 24 Feb 2016, 14:30
by sunqueen
zuro wrote:Go to your admin panel. Navigate to Custom>CSS
Add this code to your CSS file.
Code
body p,
.sqs-layout .sqs-block.html-block p,
.sqs-layout .sqs-block.markdown-block p {
  text-align: justify;
}
Next go to your folder Page and insert this code to layout or context
Code
text-justify 
Insert text to content.Done !
I wanted to thank you for posting this short and sweet way to justify content. It works like a charm!!!!
Great post, thanks you!

Re: Tip . How justified text in X3

Posted: 25 Feb 2016, 00:18
by mjau-mjau
There seems to be a problem now that your footer link is aligned left:
Image
I have added some suggestions to make this code better. First of all, I don't see what the .sqs- classes are for (unless I missed something?), seems like something inherited from somewhere else?

If you want to set justified to all paragraphs in the main content, excluding items in footer and headers (menu's etc). The below will apply to all pages without changing anything per page. NB! Careful about using justify on long paragraphs, because it is not optimized for reading long paragraphs!
Code
#content p {
  text-align: justify;
}
Finally, if you want to trigger the justify only for certain pages, then add a toggle class "justify":
Code
#content .justify p {
  text-align: justify;
}
With the specific code above, justified text will NOT apply automatically. You can apply it on a per-page basis by adding the justify class to page->settings->modules->module classes:
Image

Justify text is an interesting option ... I thought it forced side-to-side alignment of text on ALL lines, but apparently it may leave the last line alone if it is not long enough (which is good) ... You guys really think justified-text is that much better? On small paragraphs, it hardly makes a difference, and on big paragraphs it becomes less readable. Not justified vs justified ... In the case of small paragraphs, it is fine:
Image
Image

I am generally against justified text, as I don't see any advantages. It's simply not better for reading:
http://designforhackers.com/blog/never- ... n-the-web/

Re: Tip . How justified text in X3

Posted: 25 Feb 2016, 05:36
by localhost
Agree... it looks unnatural for me to read on justified texts on the web.