Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fill the width of the content in vuetify

  1. What I want is that to fill the width of the entire mobile screen with vuetify

with this code :

 <v-content>
    <router-view>
      <v-container fluid></v-container>
    </router-view>
  </v-content>

the router view has a margin on both left and right side

  1. and that bottom-nav is already fitted on the screen and I won't be dragging the screen to show the bottom-nav
like image 328
TheBAST Avatar asked Jan 09 '18 09:01

TheBAST


People also ask

What does V spacer do?

v-spacer is a basic yet versatile spacing component used to distribute remaining width in-between a parents child components. When placing a single v-spacer before or after the child components, the components will push to the right and left of its container.

What is V layout in Vuetify?

There are 2 primary layout components in Vuetify, v-app and v-main . The v-app component is the root of your application and a direct replacement for the default Vue entrypoint, <div id="app"> . The v-main component is a semantic replacement for the main HTML element and the root of your application's content.

Is Vuetify responsive?

With the VuetifyJs grid system, you can create very powerful responsive layouts without any line of JavaScript code.


2 Answers

I needed to dynamically remove padding only on mobile, this works for me:

<v-container :class="{'px-0': $vuetify.breakpoint.xsOnly }">
   <router-view> </router-view>
</v-container>

There is not much documentation that I could find as of now, but looking at the code I found these:

// Breakpoint ranges. 
xsOnly,
smOnly, 
smAndDown,
smAndUp,
mdOnly,
mdAndDown,
mdAndUp,
lgOnly,
lgAndDown,
lgAndUp,
xlOnly,
like image 103
Tim Scholten Avatar answered Sep 20 '22 16:09

Tim Scholten


you can also try this, vuetify has helper classes to set padding and margin

<v-container fluid  class="pa-0 ma-0">
</v-container>
like image 20
i5dr0id Avatar answered Sep 18 '22 16:09

i5dr0id