Topic on Project:Support desk

Forcing justification of a line

10
Dovi (talkcontribs)

Hi, a technical user question that I hope someone knows a solution for:

Is there any way when using the Mediawiki software to force justification (both left and right) for the last line of a paragraph? The idea is that the last line of the paragraph (or the only line if there is only one line of text in the paragraph), rather than showing blank space after the text ends, will be justified on both sides (this would obviously force the spaces between words to be expanded).

This function is necessary for the presentation of texts with specialized format at Wikisource. If possible, it would be employed both for "regular" wikitext as well as for text within the cells of tables. I'd be grateful to anyone who can suggest a solution. Thanks, Dovi 13:47, 10 October 2011 (UTC)

Ron Barker (talkcontribs)
Reach Out to the Truth (talkcontribs)

That doesn't mention the type of justification Dovi is looking for. I'm not sure it even exists. And if it doesn't exist in CSS, there's nothing we can do about it.

Dovi (talkcontribs)

Thanks for the input guys. If anyone does come up with any sort of trick that might allow for accomplishing this I would be grateful.

Dovi (talkcontribs)

Hi, it turns out that this is a known function in word processors called "forced justify."

And I found some old discussion of doing it in CSS here and here. So is there any trick that could make it possible in Mediawiki?

Also, are there any other Mediawiki forums where it might be appropriate to ask a question like this?Dovi 11:39, 2 November 2011 (UTC)

Reach Out to the Truth (talkcontribs)

Ah, good. Then just add that style to your text. If CSS supports it, MediaWiki supports it.

Dovi (talkcontribs)

I have no idea how to use CSS (I just found the results from a Google search). Could you give me an example of how to add the style in order to format a sample paragraph that way? Dovi 16:25, 2 November 2011 (UTC)

Dovi (talkcontribs)

Since it does seem possible, could anyone give me a boost and explain how to write the code using CSS? Dovi 15:06, 3 November 2011 (UTC)

Reach Out to the Truth (talkcontribs)

I tried giving you an example of how to do it, but it looks like MediaWiki's sanitizer is removing it. Additionally, my browser is old and doesn't support it. I have no access currently to newer browsers, so I can't determine which browsers would support it.

Dovi (talkcontribs)

"but it looks like MediaWiki's sanitizer is removing it"

What does that mean??? :-)

Could you leave the code on my user page and I'll try it with my browsers? Thanks, Dovi 15:20, 3 November 2011 (UTC)

Reply to "Forcing justification of a line"