vue.jsvuetify.jsv-btn

v-btn (floating action button) positioned absolute top does not overflow from v-card (Vue2, Vuetify)


How can I make this not hidden when it overflows the component? Thank you for your help.

<v-card>
  <v-btn @click="dialog = false" fab small absolute top right class="error">
    <v-icon>
      mdi-close
    </v-icon>
  </v-btn>
</v-card>

floating button


Solution

  • Check your CSS - your card is having overflow: hidden. Remove this CSS rule and it will work as expected.

    new Vue({
          el: '#app',
          template: '#main',
          vuetify: new Vuetify(),
        })
    <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
      <link href="https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css" rel="stylesheet">
      <link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>
    <div id="app"></div>
    <template id="main">
    <v-app>
    <v-main class="pa-8">
    <v-row justify="center">
    <v-card>
      <v-btn @click="dialog = false" fab small absolute top right class="error">
        <v-icon>
          mdi-close
        </v-icon>
      </v-btn>
      <v-card-text>This is some example text</v-card-text>
    </v-card>
    </v-row>
    </v-main>
    </v-app>
    </template>