-1

I started studying CSS and I'm using an online IDE called replit to do some tests.

Today I've tried to create a simple rectangle shape and I realized that it couldn't reach the page borders, so I'm here to ask how to make this rectangle to reach it (https://2.thiagoalonso05.repl.co).

I created an empty div and put its class as greybar, after that, I went to CSS. Here's my code:

body {
    background-color: #181818;
}

.greybar {
    display: block;
    height: 48px;
    background-color: #202020;
}

Here's an image showing where I want the grey bar to reach (the red part):

enter image description here

Dariiu
  • 35
  • 5

1 Answers1

0

Just remove the default margin and padding.

* {
margin:0;
padding:0;
}

body {
    background-color: #181818;
}

.greybar {
    display: block;
    height: 48px;
    background-color: #202020;
}
<div class="greybar"></div>
mr.Hritik
  • 577
  • 3
  • 19