Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
zuro
Experienced
Topic Author
Posts: 55
Joined: 24 Jan 2011, 12:04

Tip . How justified text in X3

13 Apr 2015, 15:43

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 !
Last edited by zuro on 23 Apr 2015, 05:58, edited 3 times in total.
 
User avatar
GGANG
Experienced
Posts: 122
Joined: 02 Feb 2012, 11:01

Re: Tip . How justified text in X3

13 Apr 2015, 22:27

@zuro
Do you have a page link URL to take a look?
 
User avatar
zuro
Experienced
Topic Author
Posts: 55
Joined: 24 Jan 2011, 12:04

Re: Tip . How justified text in X3

14 Apr 2015, 04:46

 
sunqueen
Posts: 10
Joined: 20 Jan 2016, 23:43

Re: Tip . How justified text in X3

24 Feb 2016, 14:30

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!
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Tip . How justified text in X3

25 Feb 2016, 00:18

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/
 
localhost
Experienced
Posts: 158
Joined: 20 Sep 2011, 07:09

Re: Tip . How justified text in X3

25 Feb 2016, 05:36

Agree... it looks unnatural for me to read on justified texts on the web.