I can't figure out how to fit the background color to the viewport size. I used 100vh and it covers the height correctly. However, when I used 100vw, the background only covers the screen to its right and not the left.
Here is the link to my fiddle code.
Here is my code:
HTML
<div id="main-doc">
<section id="welcome-section">
<div class="center-text">
<h1 id="title">Hello, I am Lee</h1>
<p>xxx</p>
</div>
</section>
</div>
CSS
#main-doc{
text-align: center;}
#welcome-section{
background-color: #2A3D45;
background-size: cover;
padding-top: 25px;
width: 100vw;
height: 100vh;
.center-text{
position: absolute;
width: 200px;
height: 50px;
top: 50%;
left: 50%;
margin-left: -100px;
margin-top: -25px;}