Component "Markdown". Text alignment

Hi there! I use the “Markdown” component. I could not find the alignment of the text relative to the card. Want to make the text in the center, don’t know how. In examples and training not found.( Please tell me how this can be done.

I use:

type: markdown-card
content: |
  My Text
style:
  text-align: center

1 Like

It’s not working.(
First, the correct card name is “markdown”, not “markdown-card”. When using" markdown-card " error comes out. Secondly, when you write your code, the text still remains on the left.

  - type: markdown
    content: |
         ## Who's home?? 
    style:
      text-align: center

%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA

Ok, sorry.
It works for me as an element in a picture-elements card. Which is why I had the type wrong. In the picture-elements card you have to use the ‘hui’ trick i.e.

type: hui-markdown-card

and I forgot to remove the ‘-card’

I don’t know why it works for me…
Sorry I couldn’t help more.

1 Like

FOUND IT!!! Two days of search, and it was easier to get)))

  - type: markdown
    content: |
      # <center> Кто дома? </center>

%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA

22 Likes

It does work, but this isn’t part of HTML5. Is there a way to do this with something like this?

<span style="thing: thing;">Your text</span>

Ooops, didn’t see earlier. Sorry!

Bonjour
Merci beaucoup pour cette info.
Mais où avez-vous trouver les codes du formatage du texte ? Ca serait intéressant de les avoir.
Merci