Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-11 18:11:36

petal
Member
Registered: 2009-03-05
Posts: 11
Website

[textile] how to centre text?

Sorry to ask such a basic queston, but I have a problem.
As far as I can see I have to use = to centre text, but I must be doing something wrong because whatever I do the text doesn’t centre.
I am an absolute novice and not the brightest spark so very simple terms please?

Please help?
Thanks loads

Offline

#2 2009-05-11 18:43:12

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: [textile] how to centre text?

you have to use the p tag too

ie start the line with p=. your text

notice the space after the dot.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2009-05-11 18:56:33

petal
Member
Registered: 2009-03-05
Posts: 11
Website

Re: [textile] how to centre text?

Brilliant thank you sooooo much

Offline

#4 2009-12-09 10:46:00

AdamK
Member
From: Kraków, Poland
Registered: 2009-08-11
Posts: 47

Re: [textile] how to centre text?

This is the point, where I got stuck as well: the docs are not straightforward here, all you can read here: http://textile.thresholdstate.com/ is literally “use = to get centered alignment”

And there is another question I cannot pass: how to center three * (asterisks)?

I want to divide some paragraphs

* * * like this

Greetings
Adam

Offline

#5 2009-12-09 12:07:50

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [textile] how to centre text?

AdamK wrote:

And there is another question I cannot pass: how to center three * (asterisks)?

To be able to center the thing, it requires a block element or element that has a width of a the containing element. Therefor, if you want to use only Textile, then the answer is, again, as colak mentioned:

First Paragraph.

p=. ***

Another paragraph.

If you want to center asteriks inside the paragraph with out the paragraph being styled with same whitespace as other paragraphs, then you need to style it a bit. For example, you could give the divider paragraph a class and place the asterisks there with a background image.

An another way is to surround the asterisks with an inline element (span) and then styling that span to center. Example:

%(center)***% Lorem ipsum lipsuti impsum.

And CSS for span.center:

span.center {
	display: block;
	text-align: center;
}

Offline

Board footer

Powered by FluxBB