Cannot center-justify text in nodes?
See original GitHub issueI’m trying to replicate part of the diagram found here:
(which I myself made with a graphical editor).
Here is how I started:
graph LR;
189[Add MS<br/>6789<br/>f. 189];
188[Add MS<br/>6789<br/>f. 188];
189-->188;
classDef page text-align:center;
class 188,189 page;
But I cannot get the text in each box to align in the center. I’ve been able to pass on all kinds of other CSS attributes using this format; but none of the text-align attributes seem to have any effect.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Cannot center-justify text in nodes · Issue #958 · mermaid-js ...
This does not provide a solution to how to center-justify text in nodes and, it appers to be, there is none. It's just...
Read more >text-align: center not working - Stack Overflow
text -align: center affects pure text nodes as well as child elements that have display: inline; or display: inline-block; .
Read more >Centering text in TikZ tree node - TeX - LaTeX Stack Exchange
The culprit seems to be text width . If you change it to minimum width , then the texts will be centered properly....
Read more >[upstream] Alignment/justify buttons not appearing for ... - Drupal
we have an issue with patch for that but I can't find it anymore sadly. :( ... <p class="text-align-left text-align-center text-align-right ...
Read more >Text Align in CSS – How to Align Text in Center with HTML
In this article, I will show you how to use the text-align property in CSS and show you how to vertically align text....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you! But how do I do that with the stand-alone mermaid? That is, I’m just running it from the command line to produce images.
@RobertGoulding you can use
<center>
for example…A[<center>My centered text</center>]-->B[<center>Some other text<br>with a line break</center>]