Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[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
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
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 thisGreetings
Adam
Offline
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