No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Why button is spread out when parent element display is flex

    Help
    2
    3
    1294
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bigzhu
      bigzhu last edited by

      normal button is like this

      but when set button’s parent element is flex, it’s change to this:

      button spread out so I can’t use display: flex width button?

      1 Reply Last reply Reply Quote 0
      • Dobromir
        Dobromir last edited by

        Its because the parent is set to have a align-items:stretch which stretches all the elements so they have the same position. You have to do a align-items:center or use the items-center class on the parent.

        bigzhu 1 Reply Last reply Reply Quote 1
        • bigzhu
          bigzhu @Dobromir last edited by

          @Dobromir It’s works, thank you.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post