Hello all!
Can someone help me to horizontally center the buttons inside the card space? I would like to distribute the cards within the card space, not leaving the right empty space shown by an arrow.
Thanks!
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: 'custom:button-card'
entity: switch.relay_switch_c
icon: 'mdi:lightbulb'
label: Área de Serviço1
show_state: true
show_label: true
styles:
card:
- border-radius: 15px
- height: 110px
- width: 120px
- margin: 0px 0px 0px 0px
- padding: 0px 0px
- justify-self: center
- align-self: center
icon:
- align-self: end
- width: 28px
- height: 28px
- filter: 'drop-shadow(0px 0px 1px rgba(0,0,0,1))'
label:
- justify-self: center
- align-self: end
- padding: 9px 10px
- font-size: 12px
name:
- justify-self: center
- padding: 0px 0px
- font-size: 14px
state:
- font-size: 11px
- font-family: Helvetica
- text-transform: capitalize
- font-weight: bold
- align-self: end
- justify-self: center
- padding: 9px 10px
grid:
- grid-template-areas: '"l" "i" "n" "s"'
- grid-template-rows: min-content 1fr min-content min-content
- grid-template-columns: 1fr
- type: 'custom:button-card'
entity: switch.relay_switch_c
icon: 'mdi:lightbulb'
label: Área de Serviço2
show_state: true
show_label: true
styles:
card:
- border-radius: 15px
- height: 110px
- width: 120px
- margin: 0px 0px 0px 0px
- padding: 0px 0px
- justify-self: center
- align-self: center
icon:
- align-self: end
- width: 28px
- height: 28px
- filter: 'drop-shadow(0px 0px 1px rgba(0,0,0,1))'
label:
- justify-self: center
- align-self: end
- padding: 9px 10px
- font-size: 12px
name:
- justify-self: center
- padding: 0px 0px
- font-size: 14px
state:
- font-size: 11px
- font-family: Helvetica
- text-transform: capitalize
- font-weight: bold
- align-self: end
- justify-self: center
- padding: 9px 10px
grid:
- grid-template-areas: '"l" "i" "n" "s"'
- grid-template-rows: min-content 1fr min-content min-content
- grid-template-columns: 1fr
- type: 'custom:button-card'
entity: switch.relay_switch_c
icon: 'mdi:lightbulb'
label: Área de Serviço3
show_state: true
show_label: true
styles:
card:
- border-radius: 15px
- height: 110px
- width: 120px
- margin: 0px 0px 0px 0px
- padding: 0px 0px
- justify-self: center
- align-self: center
icon:
- align-self: end
- width: 28px
- height: 28px
- filter: 'drop-shadow(0px 0px 1px rgba(0,0,0,1))'
label:
- justify-self: center
- align-self: end
- padding: 9px 10px
- font-size: 12px
name:
- justify-self: center
- padding: 0px 0px
- font-size: 14px
state:
- font-size: 11px
- font-family: Helvetica
- text-transform: capitalize
- font-weight: bold
- align-self: end
- justify-self: center
- padding: 9px 10px
grid:
- grid-template-areas: '"l" "i" "n" "s"'
- grid-template-rows: min-content 1fr min-content min-content
- grid-template-columns: 1fr
- type: horizontal-stack
cards:
- type: 'custom:button-card'
entity: switch.relay_switch_c
icon: 'mdi:lightbulb'
label: Área de Serviço4
show_state: true
show_label: true
styles:
card:
- border-radius: 15px
- height: 110px
- width: 120px
- margin: 0px 0px 0px 0px
- padding: 0px 0px
- justify-self: center
- align-self: center
icon:
- align-self: end
- width: 28px
- height: 28px
- filter: 'drop-shadow(0px 0px 1px rgba(0,0,0,1))'
label:
- justify-self: center
- align-self: end
- padding: 9px 10px
- font-size: 12px
name:
- justify-self: center
- padding: 0px 0px
- font-size: 14px
state:
- font-size: 11px
- font-family: Helvetica
- text-transform: capitalize
- font-weight: bold
- align-self: end
- justify-self: center
- padding: 9px 10px
grid:
- grid-template-areas: '"l" "i" "n" "s"'
- grid-template-rows: min-content 1fr min-content min-content
- grid-template-columns: 1fr
- type: 'custom:button-card'
entity: switch.relay_switch_c
icon: 'mdi:lightbulb'
label: Área de Serviço5
show_state: true
show_label: true
styles:
card:
- border-radius: 15px
- height: 110px
- width: 120px
- margin: 0px 0px 0px 0px
- padding: 0px 0px
- justify-self: center
- align-self: center
icon:
- align-self: end
- width: 28px
- height: 28px
- filter: 'drop-shadow(0px 0px 1px rgba(0,0,0,1))'
label:
- justify-self: center
- align-self: end
- padding: 9px 10px
- font-size: 12px
name:
- justify-self: center
- padding: 0px 0px
- font-size: 14px
state:
- font-size: 11px
- font-family: Helvetica
- text-transform: capitalize
- font-weight: bold
- align-self: end
- justify-self: center
- padding: 9px 10px
grid:
- grid-template-areas: '"l" "i" "n" "s"'
- grid-template-rows: min-content 1fr min-content min-content
- grid-template-columns: 1fr
- type: 'custom:button-card'
entity: switch.relay_switch_c
icon: 'mdi:lightbulb'
label: Área de Serviço6
show_state: true
show_label: true
styles:
card:
- border-radius: 15px
- height: 110px
- width: 120px
- margin: 0px 0px 0px 0px
- padding: 0px 0px
- justify-self: center
- align-self: center
icon:
- align-self: end
- width: 28px
- height: 28px
- filter: 'drop-shadow(0px 0px 1px rgba(0,0,0,1))'
label:
- justify-self: center
- align-self: end
- padding: 9px 10px
- font-size: 12px
name:
- justify-self: center
- padding: 0px 0px
- font-size: 14px
state:
- font-size: 11px
- font-family: Helvetica
- text-transform: capitalize
- font-weight: bold
- align-self: end
- justify-self: center
- padding: 9px 10px
grid:
- grid-template-areas: '"l" "i" "n" "s"'
- grid-template-rows: min-content 1fr min-content min-content
- grid-template-columns: 1fr
- type: horizontal-stack
cards:
- type: 'custom:button-card'
entity: switch.relay_switch_c
icon: 'mdi:lightbulb'
label: Área de Serviço7
show_state: true
show_label: true
styles:
card:
- border-radius: 15px
- height: 110px
- width: 120px
- margin: 0px 0px 0px 0px
- padding: 0px 0px
- justify-self: center
- align-self: center
icon:
- align-self: end
- width: 28px
- height: 28px
- filter: 'drop-shadow(0px 0px 1px rgba(0,0,0,1))'
label:
- justify-self: center
- align-self: end
- padding: 9px 10px
- font-size: 12px
name:
- justify-self: center
- padding: 0px 0px
- font-size: 14px
state:
- font-size: 11px
- font-family: Helvetica
- text-transform: capitalize
- font-weight: bold
- align-self: end
- justify-self: center
- padding: 9px 10px
grid:
- grid-template-areas: '"l" "i" "n" "s"'
- grid-template-rows: min-content 1fr min-content min-content
- grid-template-columns: 1fr
- type: 'custom:button-card'
entity: switch.relay_switch_c
icon: 'mdi:lightbulb'
label: Área de Serviço8
show_state: true
show_label: true
styles:
card:
- border-radius: 15px
- height: 110px
- width: 120px
- margin: 0px 0px 0px 0px
- padding: 0px 0px
- justify-self: center
- align-self: center
icon:
- align-self: end
- width: 28px
- height: 28px
- filter: 'drop-shadow(0px 0px 1px rgba(0,0,0,1))'
label:
- justify-self: center
- align-self: end
- padding: 9px 10px
- font-size: 12px
name:
- justify-self: center
- padding: 0px 0px
- font-size: 14px
state:
- font-size: 11px
- font-family: Helvetica
- text-transform: capitalize
- font-weight: bold
- align-self: end
- justify-self: center
- padding: 9px 10px
grid:
- grid-template-areas: '"l" "i" "n" "s"'
- grid-template-rows: min-content 1fr min-content min-content
- grid-template-columns: 1fr
- type: 'custom:button-card'
entity: switch.relay_switch_c
icon: 'mdi:lightbulb'
label: Área de Serviço9
show_state: true
show_label: true
styles:
card:
- border-radius: 15px
- height: 110px
- width: 120px
- margin: 0px 0px 0px 0px
- padding: 0px 0px
- justify-self: center
- align-self: center
icon:
- align-self: end
- width: 28px
- height: 28px
- filter: 'drop-shadow(0px 0px 1px rgba(0,0,0,1))'
label:
- justify-self: center
- align-self: end
- padding: 9px 10px
- font-size: 12px
name:
- justify-self: center
- padding: 0px 0px
- font-size: 14px
state:
- font-size: 11px
- font-family: Helvetica
- text-transform: capitalize
- font-weight: bold
- align-self: end
- justify-self: center
- padding: 9px 10px
grid:
- grid-template-areas: '"l" "i" "n" "s"'
- grid-template-rows: min-content 1fr min-content min-content
- grid-template-columns: 1fr