Jumbotron boot disk image not responding

I am new to bootstrap and have difficulty trying to get my jumbotron image to scale without showing a white background. I use Bootstrap Fixed Nav at the top of the page, Jumbotron (bg image) in the middle and Sticky Footer. When I test on google chrome to see if the layout is correct, it seems that the image does not stretch to the top of the footer, which shows a white background. How can I properly adjust the background image for all devices?

HTML:   

    <!-- Fixed navbar -->
    <nav class="navbar navbar-default navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <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="index.html">Jason<span>Murray</span></a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
          <ul class="nav navbar-nav navbar-right">
            <li class="active"><a href="index.html">Home</a></li>
            <li><a href="#about">About</a></li>
            <li><a href="#contact">Portfolio</a></li>
            <li><a href="#contact">Contact</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div class="jumbotron">
      <div class="container">
        <h1 class="text-center">Front-End Web Developer</h1>
        <p class="text-center">I'm Jason Murray, Front-End Web Developer who loves to write clean codes and build simplistic web designs.</p>
        <p class="text-center"><a class="btn btn-primary btn-lg" href="#" role="button">Recent Work</a></p>
      </div>
    </div>

    <footer class="footer">
      <div class="container">
        <p class="text-center">Copyright &copy; 2016 <a href="index.html" target="_blank">Jason Murray Web Design</a>. All Rights Reserved</p>
      </div>
    </footer>

    <!-- jQuery (necessary for Bootstrap JavaScript plugins) -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>

CSS:

.jumbotron {
  background: url("../img/lucho-49.jpg") no-repeat center center;
  -webkit-background-size: 100% 100%;
  -moz-background-size: 100% 100%;
  -o-background-size: 100% 100%;
  background-size: 100% 100%;
}
+4
source share
2 answers

jumbotron , margin:

.jumbotron {
  margin-bottom: 0;
}

:

+2

- jumbotron margin-bottom: 30px;.

CSS :

nav + .jumbotron {
  margin-bottom: 0;
  background: url("../img/lucho-49.jpg") no-repeat center center;
  -webkit-background-size: 100% 100%;
  -moz-background-size: 100% 100%;
  -o-background-size: 100% 100%;
  background-size: 100% 100%;
}

margin-bottom: 0; .jumbotron, - . , , nav +.jumbotron, CSS CSS- .jumbroton.

0

Source: https://habr.com/ru/post/1650425/


All Articles