Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing Margins and Padding within Vuetify

Tags:

So I'm pretty much brand new to Vuetify and Front End development, so sorry if my question is either simple or maybe even too vague.

I'm trying to build a website with Nuxt and Vuetify, but I'm having an issue with removing the padding around the edges of the pages. I've tried using different components within Vuetify such as fluid, I've tried finding and altering the container css code (which I'm not even convinced I've actually found), I've tried just about anything I have found on Stack Overflow or on the Vuetify github, but nothing is working for me.

Does anyone have some advice on how to actually go about having the container take up the whole page instead of leaving margins and padding on the side? I've spent at least 5 hours over the past 2 days trying to figure this out. This is what I currently have.

like image 236
Phil Robinson Avatar asked May 18 '18 18:05

Phil Robinson


People also ask

What is MB in Vuetify?

Material Component Framework — Vuetify. js.

Is Vuetify customizable?

Customizing. By default, Vuetify has a standard theme applied for all components. This can be easily changed. Simply pass a theme property to the Vuetify constructor.


1 Answers

use spacing helpers:

class="ma-0" removes margins
class="pa-0" removes padding
class="ma-0 pa-0" removes both

Note that these are also props but only for some (grid) components so for example:
<v-text-field class="pa-0"></v-text-field> will work,
and <v-text-field pa-0></v-text-field> will not work.

If in some components you can't remove spacing with these classes, then you need to target relevant elements with CSS.

like image 96
Traxo Avatar answered Sep 28 '22 03:09

Traxo