-2

I would like to remove the margins from my site so I don't get the scroll bars, but I can't, I've tried margin 0 and padding 0, but it still didn't work.

as you can see, it has margins on the top and on the left and the scroll bars are on the bottom and on the right

my code:

<template>
<div>
</div>
</template>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  height: 100vh;
  width: 100vw;
  background-color: blue;
  margin: 0;
  padding: 0;
}
</style>

1 Answers1

0

Try with

* {
  margin: 0;
  padding: 0;
}
Nikola Pavicevic
  • 21,952
  • 9
  • 25
  • 46
  • works perfectly, one last question, how to centralize all items? and then I close the question. – Amanda Nunes Aug 16 '21 at 22:35
  • There are many way to align content. You can align horizontally or vertically or both. For example you can use flex or css grid (`display: flex;` or `display.grid;`) then align horizontally with `justify-content: center;` and vertically with `align-items: center;` – Nikola Pavicevic Aug 16 '21 at 22:41
  • You can learn more at this links [flex](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) [grid](https://css-tricks.com/snippets/css/complete-guide-grid/) – Nikola Pavicevic Aug 16 '21 at 22:44