EWSoftware / SHFB

Sandcastle Help File Builder (SHFB). A standalone GUI, Visual Studio integration package, and MSBuild tasks providing full configuration and extensibility for building help files with the Sandcastle tools.
Other
2.2k stars 367 forks source link

How to center text #849

Closed amcrally closed 3 years ago

amcrally commented 3 years ago

There's a way to align text to center? It is useful mostly inside tag of a table.

EWSoftware commented 3 years ago

There are no tags in MAML or XML comments to specify text alignment. However, you can use standard HTML tags to achieve the same result. If used in MAML, wrap them in a markup element so that they are passed through when the topic is built.

This is just an example and there may be a better way and this hasn't been tested:

MAML example:
<table>
    <row>
        <entry><markup><div style="width: 100%; text-align: center;">Cell 1</div></markup></entry>
        <entry>Cell 2</entry>
    <row>
</table>
amcrally commented 3 years ago

Great! Thank you for the example you gave me! It Works!