Search…

X3 Photo Gallery Support Forums

Search…
 
hardliner
Experienced
Topic Author
Posts: 134
Joined: 22 Jul 2011, 10:15

After Update Content align left not centered

02 Mar 2017, 16:03

Hello guys,

the Issue after the Update to 22.2 the Link in the Content Area was not centered.  I set a Link to go up in the Menu Hirarchie.

example is:  [zurück zur Übersicht](/protect/manuela_matteo/)

The example was before Update centered in the Content Area.

Its this a bug or a feature?

Regards
hardliner
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: After Update Content align left not centered

03 Mar 2017, 01:25

Yes you are correct. Let me explain how this worked before, why it was removed, and how you can fix it:

How it worked before
Before X3 0.22, we had a "fix" in place for CONTENT, so that if there was a SINGLE paragraph <p>, it would be centered. If there was MORE than one paragraph <p>, text would be LEFT aligned. This was really just a "hack", because we figured it looked nice with text aligned to center if there is only a little text, although by default, text should always be aligned to LEFT for readability.

Why was it removed in X3 0.22?
The fix was removed in X3 0.22 simply because this fix was too random, and it shouldn't be imposed upon default content layout. What if there is only one long paragraph? It should be left-aligned for readability.

How to manually center-align:
If you want to align something (anything) to center, use this basic html:
Code
<p class="text-center">Any text goes here</p>
Or:
Code
<div class="text-center">Use a div tag if your custom content includes images or more than just text</div>
* Unfortunately, you cannot use markdown tags inside html tags. You would need to continue to use html.

We would like to add an editor button for align, but it is a bit complicated because markdown does not support any align tags. We will be looking into this for a future release.
 
hardliner
Experienced
Topic Author
Posts: 134
Joined: 22 Jul 2011, 10:15

Re: After Update Content align left not centered

03 Mar 2017, 02:24

hello mjau,

i have fixed the Issue with <center>text</center>

But i hope you have another path to fix this Issue.

Best Regards
hardliner
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: After Update Content align left not centered

03 Mar 2017, 09:07

hardliner wrote:But i hope you have another path to fix this Issue.
So you can use a button in the editor instead of html to CENTER text? YES

So your "content" is automatically centered? NO. Content will always be left-aligned BY DEFAULT unless explicitly set to align center or right by tag. There is no reason we should center-align content by default. People read from left-to-right, and we can't "guess" that you just have a small arrow you want centered.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: After Update Content align left not centered

05 Mar 2017, 09:41

Just to conclude this issue, the reason why there is no ALIGN button in the content-editor, is because Markdown [2] (which X3 uses) simply does not support text align. Markdown is popular, because it is offers modern text-formatting, in an easy-to-read, easy-to-write plain text format, simple for everybody.

The only way to achieve text-align, is to use HTML:
Code
<center>something here</center>
The only way we can offer an ALIGN button in the text-editor, is to offer an OPTIONAL Html-WYSIWIG editor (instead of the current markdown editor). We don't recommend this, because a html-editor will hide the code, and may break your content or make it look weird because of all the invisible tags going on behind the editor. We WILL hover be offering an optional html-editor in a new X3 release later this year.