0

I want to delete the blank area under the container in bootstrap. How can I do that?

enter image description here

.p {
  color: white;
}

.box_switch {
  position: relative;
  background: #1E3E75;
  padding: 15px;
  margin-bottom: 30px;
  margin: 0px calc(50% - 50vw) 15px;
  width: 100vw;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css" />
<div class="container">
  <div class="row mx-auto text-center">
    <div class="col-12">
      <div class="box_switch">
        <p class="p">PPPPPPPPPPP</p>
      </div>
    </div>
  </div>
</div>
mplungjan
  • 169,008
  • 28
  • 173
  • 236

1 Answers1

0

Browsers apply a default stylesheet to HTML documents. This default contains a margin for the <body> element. Add

body {
  margin: 0;
}

to your stylesheet and the white area vanishes.

Boldewyn
  • 81,211
  • 44
  • 156
  • 212