I’ve got following image card. But seems I can’t align the image in the center?
I had to limit the image a bit, because else my widget went insane big.
My yaml code:
footer: = "Verbruik is " + items.Sch_OnOff3_Watts.state + " W"
The style property in this case is applying styles to the image element and not the image-element’s container. You could use the
stylesheet method to inject some css for the container to alter how it positions child elements. However, in this case, since you are already modifying the image width, I suggest a much more basic approach.
max-width to a % value instead (e.g., 20%). Then you can add left and right padding values to get to a total of 100% and that will center the image (and be a more size responsive layout anyway):