Skip to content

Possible to evenly space multiple buttons to each other? #53

Answered by jcwillox
alexrmay91 asked this question in Q&A
Discussion options

You must be logged in to vote

Good question, so the best way to do this is by using width: 100% and margin, basically, you set each button to have a width of 100% and then use margins to control the spacing between them. Here's an example

type: entities
title: Internet
state_color: true
entities:
  - type: custom:paper-buttons-row
    base_config:
      style:
        button:
          margin-bottom: 8px
          margin-left: 4px
          margin-right: 4px
          width: 100%

          # other aesthetic styling options
          background-color: var(--table-row-background-color)
          border: 1px solid
          border-color: '#FFFFFF'
          border-radius: 4px
          justify-content: center
    buttons:…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by jcwillox
Comment options

You must be logged in to vote
6 replies
@Mithrox
Comment options

@jcwillox
Comment options

@Mithrox
Comment options

@Mithrox
Comment options

@Mithrox
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants