White space under image/at the end of website


#1

Hi everyone i am experiencing some weird problems with my code. I use the boostrap. For some reason the first jumbotron image leaves a white space no matter what.

After the HTML code the CSS code appears


<!DOCTYPE html>
<html>
	<head>
 <title>Genefke & Hviid-Nielsen</title>
  <meta charset="utf-8"/>
<link type="text/css" rel="stylesheet" href="style.css" />

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" 
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" 
integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
</head>
<body>

<header class="navbar-inverse" role="banner">
<div class="container">
<nav role="navigation">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">Brand</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
        <li><a href="#">Link</a></li>
        <li class="dropdown">
          <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="#">Action</a></li>
            <li><a href="#">Another action</a></li>
            <li><a href="#">Something else here</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="#">Separated link</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="#">One more separated link</a></li>
          </ul>
        </li>
      </ul>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
</div>
</header>

  <section class="jumbotron">
    <div class="container">
      <div class="row text-center">
        <h2>Genefke & Goldsmith Law Firm</h2>
        <h3>Lawyers you'll swear by, not at.</h3>
		<a class="btn btn-primary" href="#">Contact us</a>
      </div>
    </div>
</section>

<section class="jumbotron-clients">
	<div class="container">
	<div class="row text-center">
	<h2>About us</h2>
      </div>
	  </div>
	  </section>
	  
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" 
integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
</body>
</html>


.jumbotron {
display: flex;
align-items: center;
background-image: url('justice.jpg');
background-size: cover;
color: white;
height: 1000px;
}

.jumbotron h2 {
color: white;
font-size: 50px;
font-family: 'Goudy Old Style';
}

.jumbotron h3 {
color: white;
}

.jumbotron-clients {
display: flex;
align-items: center;
background-image: url('indepth.jpg');
background-size: cover;
color: white;
height: 1000px;
}

.jumbotron-clients h2 {
color: black;
font-size: 50px;
font-family: 'Goudy Old Style'
}


#2

impossible to determine, we don't have access to the images, could you upload the images and tweak your code so they work with those images? Then i will have a look


#3

file:///C:/Users/User/Desktop/index.html

I don't know if this link will work? Else if you put it into notepad it will work i think


#4

If you now also upload indepth.jpg to the codecademy forum, i can make it work

file:///C:/Users/User/Desktop/index.html is a local file on your computer, i can't access it. Be glad i can't, otherwise your computer would have a huge security problem


#5


#6

wow, how did i miss it? Anyway, i put your code here. The gap is caused by margin-bottom of the .jumbotron, add margin-bottom: 0, which i already did for you, and the gap should close. Sorry it took so long, i should have seen it :open_mouth: Sloppy of me


#7

Thank you so much! Really appreciate guys like you :slight_smile: