Toast width with html formatting

Toasts center themselves on the screen but if I use any html formatting it shows on the right side of the screen. his a bug or something I can deal with?

Toast1_title.innerHTML = "Import" centers ok

Toast1_title.innerHTML = "<h3>Import</h3>" Does not center

image

By default, text elements are left aligned. Try adding a style=“text-align: center;” to the opening h3 and see if that helps. If it does then do a permanent fix in your css

Did this but it center aligns the text in the toast , as you’d expect but does nothing for the position of the toast on the screen.

"<h3 style='text-align: center'}>Calvings successfully updated</h3>"

image

I changed the Toast’s Left, Top and Width references percentages instead of auto and all looking good now