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

    [Solved]How to set back ground color for Qmodal?

    Help
    background color qmodal
    3
    4
    987
    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.
    • J
      justkkg last edited by justkkg

      it seems not work neither you try to set it by set content-css in Qmodal nor by set content-class in QModalLayout, not work in style setting too,always show complete white background
      could any one help?thanks!
      the template is shown as below:
      <template>
      <q-item v-close-overlay>
      <q-item-main>
      <q-btn label=“spider” @click=“maximizedModal = true”></q-btn>
      <q-modal v-model=“maximizedModal” class=“bg-positive” maximized :content-css="{padding: ‘50px’}">
      <q-modal-layout content-style="{fontWeight: ‘bold’}">
      <div >please set date</div>
      <q-datetime v-model=“date_start” inverted color=“yellow” type=“date” placeholder=“start date”/>
      <q-btn color=“tertiary” @click=“maximizedModal = false” label=“Close” />
      <p>start</p>
      </q-modal-layout>
      </q-modal>
      </q-item-main>
      </q-item>
      </template>

      1 Reply Last reply Reply Quote 0
      • S
        Sweetyy last edited by Sweetyy

        Hi @justkkg,

        Move your class="bg-positive" in the <q-modal-layout> like that :

        <q-modal-layout content-style="{fontWeight: 'bold'}" class="bg-positive">
        

        It changes the full background of the modal in positive (no white anymore !). Hope it helps !

        J 1 Reply Last reply Reply Quote 0
        • J
          justkkg @Sweetyy last edited by

          @sweetyy
          it works,thank you!

          1 Reply Last reply Reply Quote 0
          • R
            rconstantine last edited by

            This isn’t working for me. I tried the class on both the modal and the modal layout, but neither worked. I see those two elements in the resulting HTML, and a DIV is inserted between them. If I manually change that DIV in dev tools in chrome, I can set the background on it and it behaves correctly. So why isn’t the DIV receiving the class from either component?

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