Lovelace - Card position

hello dear user, i’m new here and please excuse my bad english i use a google translator because i don’t know how to help myself anymore.

i have home assistant and button cards. I would like to arrange the switches better. so that the two small front (light and light) are right next to each other. When I’m setting up, there’s always this gray bar that’s bigger than the button itself.

can someone please help me with this so that I can get the “nice” out?

this is my script:

type: custom:button-card
card_size: 4
name: Licht
tap_action:
action: toggle
entity: switch.licht_schlafzimmer_switch_1
icon: mdi:ceiling-light-outline
styles:
card:
- height: 80px
- width: 80px

thank you and apologies

Grey bar ? , do you mean the “grey bar” you can use to re-arrange the cards ?

To get your lovelace dashboard lined up, i always prefer to use a grid, combined with a horizontal/ vertical stack. (Use hacs for this) So add a grid to your lovelace and add start building in your preferred order.

If you know what button lay-out you like, you can always compare the yaml code in the code editor