Hi all
I’m using the custom text-element in a picture-element card to add some labels. I am struggling now to get the text labels aligned to the left. For example when I use two different text lables with different length like below it aligns the center of the text box to the ‘top’ and left’ instructions based on the ‘translate(-50%, -50%)’ instruction = middle of the text object.
- type: custom:text-element
text: "textlabel"
style:
top: 12.3%
left: 11.5%
transform: 'translate(-50%, -50%) scale( 0.8, 0.8 )'
- type: custom:text-element
text: "textlabel 2"
style:
top: 16%
left: 11.5%
transform: 'translate(-50%, -50%) scale( 0.8, 0.8 )'
Now I would like to position the top left corner of the text box (makes it easier to align the labels to the left). When I change the code to 'translate(0,0) for instance, or totally leave out the translate instruction, it doesn’t align to the left.
Any ideas what I’m doing wrong