Center Webpage in card


I have a very simple webpage card that I would like to center horizontally within the card to remove the white space on the right hand side:


Very basic card currently:

type: iframe
url: >-|medium|portrait|days-3|classic&loc=auckland&type=urban
aspect_ratio: 50%

I do have layout-card installed, but I haven’t had much luck with finding out anything around centering.
I know it’ll be straightforward…

On a related tangent, is scaling this down a little an option too?

Help much appreciated!

If you only need to center the webpage in the card (not stretch) - then probably this may be fixed by card-mod. Go to Code Inspector in your browser and play with alignment. Cannot provide you a ready solution now, far away from a PC for a while.

Through trial and error I’ve come up with this to better make use of the space:

with temp

type: custom:mod-card
  hui-horizontal-stack-card$: |
    hui-iframe-card {
      width: 24%;
      flex: auto !important; 
    gauge-card {
      flex: auto !important; 
  type: horizontal-stack
    - type: iframe
      url: >-|medium|portrait|days-3|classic&loc=auckland&type=urban
      aspect_ratio: 58%
    - type: gauge
      entity: sensor.ble_temperature_outdoor
        green: 0
        yellow: 25
        red: 29
      min: 10
      max: 35
      name: Outdoors

Probably still find a better use of the right-hand portion in time.
Am I doing this correctly?
Any suggestions?

Seems to be good, check last example in that post.