Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vuetify.js how to get full width of v-container

I'm new to vuetify.js and started playing around with it.

enter image description here

This is my code.

Admin-panel.vue

<v-content class="yellow">
  <v-container>
    <v-layout>
      <router-view></router-view>
    </v-layout>
  </v-container>
</v-content>

create-user.vue

<template>
    <v-container class="red">
        <v-layout class="blue">
            <v-flex md12>
                form
            </v-flex>
        </v-layout>
    </v-container>
</template>

Here I can see v-container element gets the full width available. What I want is my v-container inside the create-user component to get the that same width. (Yellow will disappear and red will fill the screen)

How do I achieve this?

like image 590
Pathum Kalhan Avatar asked Jun 26 '18 08:06

Pathum Kalhan


People also ask

How do I change the width on Vuetify?

To change the default width of a Vuetify data table cell, we can set the headers prop to an array with the column widths. to add the v-data-table component with the headers prop to set the table headers data. We set the headers prop to the headers array.

What is V spacer in Vuetify?

The v-spacer component is useful when you want to fill available space or make space between two components. .col. .col. .col-auto. .col.

How do I change my height on Vuetify?

To set the height of Vuetify card with Vue. js, we can set the height prop of the v-card component. to set the height prop of the v-card component to 100% to set the height of the card to 100%.


Video Answer


2 Answers

Use the fluid prop:

<v-container 
  fluid
/>

Codepen.

like image 141
Billal Begueradj Avatar answered Oct 13 '22 10:10

Billal Begueradj


I was having the same issue.

I realized that in my instance I had a <v-content> on both the parent and child page. The <v-content> is used to make the app look pretty and manage spacing on the nav bar and title bar.

Be sure you only have one declared in your app.

like image 25
jacstrong Avatar answered Oct 13 '22 10:10

jacstrong