Task 2/5 background-img scaling in .jumbotron


Link to the exercise:

What do I have to write to make the background-image shrink to the size of the .jumbotron-div?


.jumbotron {
  background: url('https://s3.amazonaws.com/codecademy-content/projects/bestbite/bg.jpg');
  height: 500px;


    <div class="jumbotron">
      <div class="container">
        <div class="row">
          <div class="col-md-4 col-md-offset-4">

Thank you for your help!



then use
background-position:center center; to make sure it centers the picture.

** this uses the proper background size to enlarge or shrink the image to fit the jumbotron
it doesn't distort your image like traditional method of shrinking


works perfectly, thx!


i'm glad it did good luck


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.