Reputation: 570
The problem is about-me section is slightly more wider than the header section even though they both have the same width.You can even observe this in the picture. Blue background is header section inspected in console and white area is the about me section This is also showing the side navigation bar on the bottom which is trouble some.
<!--Header Section -->
<section id="header">
<div class="header-bg-overlay">
<div class="header-bg">
<div class="container">
<div class="hero-content">
</div>
</div>
</div>
</div>
</section>
<section id="about-me">
<div class="about-section">
</div>
</section>
CSS
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: 'Montserrat', sans-serif;
}
h5{
color:white;
font-size:75px;
font-weight: bold;
}
h4{
color:white;
font-size:55px;
font-weight: bold;
}
body{
font-family: 'Roboto', sans-serif;
margin:0;
padding: 0;
}
.header-bg{
width:100vw;
height: 100vh;
background-color: black;
background: url('../assets/background.jpg')no-repeat center;
background-position: -30px -80px;
}
#about-me{
width:100vw;
height: 100vh;
background-color: #FFFFFF;
box-sizing: border-box;
}
Upvotes: 2
Views: 3726
Reputation: 831
Space and new line characters in your HTML code are rendered as one-character space in the browser. Because of that, actually there is another element in addition to the box with 100vw and 100vh dimensions and this causes the overflow.
You have two options:
Upvotes: 0
Reputation: 1
vw = document + scrollbar.
Fix:
.header-bg, #about-me {
width: 100vw;
max-width: 100%
}
Upvotes: 0