Skip to content

How to change the distance between buttons contained in a div (or label) #738

Closed Answered by falkoschindler
JustinHowes01 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @JustinHowes01! What classes have you tried?
Here is an explanation on how to set the gap of a ui.row or ui.column container: #705 (comment)

You have multiple options.

  • CSS:

    with ui.row().style('gap: 0'):
        ui.label('A')
        ui.label('B')
  • Tailwind classes:

    with ui.row().classes('gap-0'):
        ui.label('A')
        ui.label('B')
  • the new tailwind API (coming in NiceGUI 1.2.4):

    with ui.row() as row:
        row.tailwind.gap('0')
        ui.label('A')
        ui.label('B')

    or:

    with ui.row() as row:
        row.tailwind('gap-0')
        ui.label('A')
        ui.label('B')

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JustinHowes01
Comment options

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