ChiliProject is not maintained anymore.
Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and
we urge all existing users to migrate their data to a maintained
system, e.g. Redmine. We will
provide a migration script later. In the meantime, you can use the
instructions by
Christian Daehn.
Forums » Discuss »
Wiki formatting/Textile: Aligning entire tables
Added by Kris Lou at 2012-01-22 07:24 pm
Does anybody know how to (if its possible to) center or float/align right entire tables, not just the text (without custom CSS)?
Just something that's been bothering me for a while. I'm not sure if its a CP/Redmine implementation or Textile limitation.
Probably not doable out of the box, and IIRC not that easy to begin with even when you have more control of the CSS.
In pure textile it would probably be doable by explicitly setting widths for some fields, but CP/Redmine have deactivated the ability to pass custom CSS in Textile as it is too big of a possible attack (XSS) vector.
There is textile syntax for that. The only thing missing are proper CS classes. You can add those in your custom theme:
table(centered).
|_. Header 1 |_. Header2 |
| Some | Content |
The common syntax for aligning stuff also works, but as it just sets the text-align
, it's not overly useful for block elements like a table.
table<.
|_. Header 1 |_. Header2 |
| Some | Content |
I propose you use the above textile syntax to set a class on table (in that case centered
) and then define the same class in your custom theme to format the table centered.
As Felix said, we have disabled the ability to set arbitrary CSS on elements (with the {}
syntax of Textile) for security reasons. But setting classes is fine if you have some CSS in your theme to back that up.
Thanks for the reply and clarification. If I can get Wiki Extensions working, then we'll be in (relative) business!