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

    How to add a sticky note to a q-card?

    Help
    3
    4
    614
    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.
    • W
      wpq last edited by

      As part of my page (which is in an outermost q-layout), I also have a modal q-dialog that pops up at some conditions. The actual component is a q-card.

      I would like to add to this card a fixed sticky bar at the bottom. I belive that the right way to do that is by using a q-page-sticky.

      The problem: the message appears at the bottom of the whole browser page, not in the card.

      For reference, the general (simplified) structure is

      <template>
        <q-layout
          view="lHh Lpr lFf"
          >
          <q-page-container
            class="q-pa-md">
      
            (... content of the page with inputs, buttons etc. ...)
      
            <q-layout>
            <q-dialog (...)>
              <q-card>
                <q-card-section>
                  (...)
                </q-card-section>
                <q-card-section>
                  (...)
                </q-card-section>
              </q-card>
      
              <q-page-sticky position="bottom">
                the text I want to have at the bottom of the card
              </q-page-sticky>
      
            </q-dialog>
            </q-layout>
      
          </q-page-container>
        </q-layout>
      </template>
      

      I tried to move the q-page-sticky section within the q-card- same problem.

      Is there a way to have it in the q-card?

      Note: the height of the q-card is fixed.

      dobbel I 2 Replies Last reply Reply Quote 0
      • dobbel
        dobbel @wpq last edited by

        @wpq

        Please create a codepen.io for better support .

        1 Reply Last reply Reply Quote 0
        • I
          Ilia @wpq last edited by

          @wpq try

          <q-card class="relative-position">
            <div id="sticky" class="absolute-bottom">Sticky content</div>
          </q-card>
          

          Hope that helps 🙂

          dobbel 1 Reply Last reply Reply Quote 0
          • dobbel
            dobbel @Ilia last edited by

            @ilia

            That is just posting code. You can easily create a codepen.io by using one of quasar’s example codepen’s.

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