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

    Centering q-toolbar title / Using flex CSS on q-toolbar

    Help
    5
    5
    2878
    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.
    • S
      sarndt last edited by

      Hello,

      I’m having a bit of trouble with the q-toolbar. I wish to use the toolbar in the following way:

      Have some buttons left, a centered title and some buttons right, like this:
      (I’m not sure if it comes out correctly, but pretend the title is centered, and the buttons are left and right flushed)

      ------------------------------------------------------------------------------------------------
      | Button1  Button2                         Title                                       Button3 |
      ------------------------------------------------------------------------------------------------
      

      Basically, how would I do that? I tried to use <div class=".col">..</div> within the toolbar 3 times, but it doesn’t work, things like justify-around won’t work either if I have a different amount of buttons on either side.

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

        Your best bet is diving up the available space into three parts q-toolbar>div.row-4*3

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

          Hi Sarndt,
          Did you solved your question?
          I want the same design. The doc of toolbar layout doesn’t talk much about layout.

          1 Reply Last reply Reply Quote 0
          • rstoenescu
            rstoenescu Admin last edited by

            https://jsfiddle.net/5rvxmo62/
            QToolbar is using flexbox CSS, so if you understand Quasar Flex CSS or flexbox you’re good to go. And it’s easy!

            1 Reply Last reply Reply Quote 0
            • D
              Dapeng last edited by

              Here is my solution with “absolute-center”:
              <q-toolbar>
              <q-toolbar-title class=“absolute-center”>Your Toolbar Title</q-toolbar-title>
              </q-toolbar>

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