Webpage not sizing correctly when scaling down

I think the pictures i’m posting will demonstrate this better. Whenever I size down my browser, there’s still a scroll bar at the bottom that shows extra un-wanted background image.


body {
    background-image: url(https://images.unsplash.com/photo-1506744038136-46273834b3fb?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1950&q=80);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    font-family: 'Montserrat', sans-serif;
    color: white;

html {
    height: 100%;
    box-shadow: inset 0 0 0 1000px rgba(0,0,0,.4);

#content {
    text-align: center;
    padding-top: 25%;
    text-shadow: 0px 4px 3px rgba(0,0,0,.3),
                 0px 8px 10px rgba(0,0,0,.1),
                 0px 10px 16px rgba(0,0,0,.1);

h1 {
    font-weight: 700;
    font-size: 5em;
    width: auto;
    padding: 0px, 0px, 0px, 0px;

hr {
    width: 960px;
    border-top: 1px solid #f8f8f8;
    border-bottom: 1px solid rgba(0,0,0,0.2);


<!doctype html>
<html lang="en">

    <title>Jared Monkman | Web Developer</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="icon" href="./resources/images/JM PNG Black.png" type="image/icon type">
    <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
        integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <script src="https://kit.fontawesome.com/944384f346.js" crossorigin="anonymous"></script>
    <link rel="stylesheet" href="./resources/css/index.css">


    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <div class="container">
            <a class="navbar-brand" href="#">
                <img src="./resources/images/JM PNG.png" alt="Logo" style="width:40px;">
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <ul class="navbar-nav mr-auto">
                    <li class="nav-item active"><a class="nav-link" href="#">Home <span
                    <li class="nav-item"><a class="nav-link" href="#">Portfolio</a></li>
                    <li class="nav-item"><a class="nav-link" href="#">Contact</a></li>
                <ul class="nav navbar-nav navbar-right" id>
                    <li><i class="fab fa-linkedin" id="linkedin"></i></li>
                    <li><i class="fab fa-github-square"></i></li>


    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <div id="content">
                    <h1>Aspiring Full-stack Web Developer </h1>
                    <h3>Producing high quality websites and exceptional user experience</h3>
                    <button class="btn-default btn-lg"> <i class="fas fa-briefcase"></i> View my work!</button>


    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"


Hello @jaredmonkman, I suppose the problem is that you haven’t specified what to do with the background image if it takes up too much space. You’ve set the background-repeat: no-repeat, you might have to use the overflow property. W3Schools article. Also, media queries are useful in this situation, although I’m not sure if you’ve done them.

@media only screen and (max-width: 600px)/*or whatever you want it*/{
/*Rules for when this is met*/
h1 {
  font-family: serif;

I hope this helps!

Also note that in this case, <hr> having a fixed width of 960px will always remain at 960px even if you resize your browser window.

You could use @media queries, or relative units (like percentages).

@media (max-width: 960px) {
  hr {
    width: 100%

That’s up to you.