title: how to fill the container with background image in css?
body: <p>so as you can see I have used a background image for my Container but it isn't filling up the container fully, I have tried the object-fit property but it isn't working, the image is still sticking on the left side of the container, what should I do.</p>
  <p>here is the screenshot for the image (1st problem): <a href="https://imgur.com/puw3bDN" rel="nofollow noreferrer">https://imgur.com/puw3bDN</a></p>
  <p>now about the second problem, the image inside (.feature2::before) is exceeding the container, I have tried using width but it is not working.</p>
  <p>here is the link to screenshot: <a href="https://imgur.com/YPTelhD" rel="nofollow noreferrer">https://imgur.com/YPTelhD</a></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;600&amp;display=swap");
  
  * {
    margin: 0;
    padding: 0;
  
    list-style-type: none;
    text-align: center;
  }
  body {
    height: 100vh;
    font-family: "Bai Jamjuree", sans-serif;
    display: flex;
    font-size: 18px;
  }
  .primary {
    color: #4a4f53;
  }
  .neutral {
    color: #b3b7b8;
  }
  .container {
    background: url(./media/bg-header-mobile.png) no-repeat top;
    object-fit: cover;
    width: 23.438rem;
    height: 325.313rem;
    border: 1px red solid;
    margin: 0 auto;
    padding: 9.375rem 2rem;
  }
  
  .main_logo {
    opacity: 85%;
    width: 8.5rem;
    margin-top: 1.59rem;
  }
  
  .main_heading {
    font-size: 1.9rem;
    line-height: 1.35;
    margin-top: 3.5rem;
    width: 100%;
    margin-bottom: 1.8rem;
  }
  .main_content {
    margin-bottom: 3.5rem;
  }
  
  .button {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  
  .ios {
    background: #26bba5;
    color: white;
    font-size: 700;
    padding: 15px 10px;
    border-radius: 50px;
    border-bottom: 3px #219f8a solid;
    box-shadow: 0 2px 10px #26bba5;
    margin-bottom: 1.5rem;
  }
  .mac {
    background: #6174ff;
    color: white;
    font-size: 700;
    padding: 15px 10px;
    border-radius: 50px;
    border-bottom: 3px #4f62da solid;
    box-shadow: 0 2px 5px #6174ff;
  }
  
  .feature1 {
    margin-top: 12rem;
  }
  
  .feature1_dis {
    margin-top: 1.8rem;
  }
  
  .feature2::before {
    content: url(./media/image-computer.png);
    border: 1px red solid;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta name="viewport" content="width=default-width, initial-scale=1"&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;meta lang="en"&gt;
          &lt;link href="style.css" rel="stylesheet"&gt;
      &lt;/head&gt;
      
      &lt;body&gt;
          &lt;div class="container"&gt;
          &lt;header&gt;
              &lt;img src="media/logo.svg" class="main_logo"/&gt;
              &lt;h1 class="main_heading  primary"&gt;
                  A history of everything you copy
              &lt;/h1&gt;
              &lt;article class="main_content neutral"&gt;Clipbord allows you to track and organize everything you copy instantly access your clipboard on all your devices.&lt;/article&gt;
          &lt;div class="button"&gt;
              &lt;botton class="ios"&gt;
                  Download for iOS
              &lt;/botton&gt;
              &lt;botton class="mac"&gt;
                  Download for Mac
              &lt;/botton&gt;
          &lt;/div&gt;
          &lt;/header&gt;
  
          &lt;main&gt;
              &lt;div&gt;&lt;/div&gt;
              &lt;section class="features"&gt;
                  &lt;h1 class="feature1 primary"&gt;Keep track of your snippets&lt;/h1&gt;
                  &lt;article class="feature1_dis neutral"&gt;Clipboard instantly stores any items you copy in the cloud, meaning you can access your snippets immediately on all your devices. Our Mac and iOS apps will help you organize everything.&lt;/article&gt;
                  &lt;h1 class="feature2 primary"&gt;
                      Quick Search
                  &lt;/h1&gt;
                  &lt;article class="feature2_dis neutral"&gt;
                      Easily search your snippets by content, category, web address, application, and more.
                  &lt;/article&gt;
                  &lt;h1 class="feature3 primary"&gt;
                      iCloud Sync
                  &lt;/h1&gt;
                  &lt;article class="feature3_dis neutral"&gt;
                      Instantly saves and syncs snippets across all your devices.
                  &lt;/article&gt;
                  &lt;h1 class="feature4 primary"&gt;
                      Complete History
                  &lt;/h1&gt;
                  &lt;article class="feature4_dis neutral"&gt;
                      Retrieve any snippets from the first moment you started using the app.
                  &lt;/article&gt;
                  &lt;h1 class="feature5 primary"&gt;
                      Access Clipboard Anywhere
                  &lt;/h1&gt;
                  &lt;aritical class="feature5_dis neutral"&gt;
                      Whether you're on the go, or at your computer, you can access all your Clipboard snippets in a few simple clicks.
                  &lt;/aritical&gt;
                  &lt;h1 class="feature6 primary"&gt;
                      Supercharge your workflow
                  &lt;/h1&gt;
                  &lt;article class="feature6_dis neutral"&gt;
                      We've got the tools to boost your produtivity.
                  &lt;/article&gt;
                  &lt;h1 class="feature7 primary"&gt;
                      Create blacklists
                  &lt;/h1&gt;
                  &lt;article class="feature7_dis neutral"&gt;
                      Ensure sensitive information never makes its way to your clipboard by excluding certain sources.
                  &lt;/article&gt;
                  &lt;h1 class="feature8 primary"&gt;
                      Plain text snippets
                  &lt;/h1&gt;
                  &lt;article class="feature8_dis neutral"&gt;
                      Remove unwanted formatting from copied text for a consistent look.
                  &lt;/article&gt;
                  &lt;h1 class="feature9 primary"&gt;
                      Sneak preview
                  &lt;/h1&gt;
                  &lt;article class="feature9_dis neutral"&gt;
                      Quick preview of all snippets on your Clipboard for easy access.
                  &lt;/article&gt;
              &lt;/section&gt;
  
              &lt;div class="companies"&gt;
                  &lt;ul class="comp"&gt;
                      &lt;li class="com"&gt;
                          &lt;a href="google.com"&gt;
                              &lt;img class="white"src="./media/logo-google.png" alt="google.com"&gt;
                          &lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li class="com"&gt;
                          &lt;a href="IBM.com"&gt;
                              &lt;img class="white"src="./media/logo-ibm.png" alt="IBM.com"&gt;
                          &lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li class="com"&gt;
                          &lt;a href="Microsoft.com"&gt;
                              &lt;img class="white"src="./media/logo-microsoft.png" alt="Microsoft.com"&gt;
                          &lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li class="com"&gt;
                          &lt;a href="https://www.hpe.com/us/en/home.html"&gt;
                              &lt;img class="white"src="./media/logo-hp.png" alt="https://www.hpe.com/us/en/home.html"&gt;
                          &lt;/a&gt;
                      &lt;/li&gt;
                      &lt;li class"com"&gt;
                          &lt;a href="https://en.wikipedia.org/wiki/Vector_graphics"&gt;
                          &lt;img class="white" src="./media/logo-vector-graphics.png" alt="vector graphics"&gt;
                      &lt;/a&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
  
              &lt;div class="lower_section"&gt;
                  &lt;section class="lower_section"&gt;
                  &lt;h1 class="lower_heading primary"&gt;Clipboard for iOS and Mac OS&lt;/h1&gt;
                  &lt;article class="lower_content neutral"&gt;
                      Available for free on the App Store Download for Mac or iOS, sync with iCloud and you're ready to start adding to your clipboard.
                  &lt;/article&gt;
                  &lt;div class="button"&gt;
                  &lt;botton class="ios"&gt;
                      Download for iOS
                  &lt;/botton&gt;
                  &lt;botton class="mac"&gt;
                      Download for Mac
                  &lt;/botton&gt;
              &lt;/div&gt;
              &lt;/section&gt;
              &lt;/div&gt;
          &lt;/main&gt;
          
          &lt;footer&gt;
              &lt;div class="foot"&gt;
                  &lt;img src="media/logo.svg"
              alt="logo"&gt;
              &lt;nav class="navigation_bar"&gt;
                  &lt;ul class="nav_list"&gt;
                      &lt;li class="items"&gt;FAQs&lt;/li&gt;
                      &lt;li class="items"&gt;Contact Us&lt;/li&gt;
                      &lt;li class="items"&gt;Privacy Policy&lt;/li&gt;
                      &lt;li class="items"&gt;Press Kit&lt;/li&gt;
                      &lt;li class="items"&gt;Install Guide &lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/nav&gt;
               &lt;/div&gt;
               &lt;div class="media"&gt;
                   &lt;ul class="media-list"&gt;
                       &lt;li class="media_items primary"&gt;
                           &lt;a href="facebook.com"&gt;
                               &lt;img src="./media/icon-facebook.svg" alt="facebook_icon"&gt;
                              &lt;/a&gt;
                          &lt;/li&gt;
                       &lt;li class="media_items primary"&gt;
                           &lt;a href="twitter.com"&gt;
                               &lt;img src="./media/icon-twitter.svg" alt="twitter-icon"&gt;
                           &lt;/a&gt;
                       &lt;/li&gt;
                       &lt;li class="media_items primary"&gt;
                           &lt;a href="instagram.com"&gt;
                           &lt;img src="./media/icon-instagram.svg" alt="instagram-icon"&gt;
                       &lt;/a&gt;
                      &lt;/li&gt;
                   &lt;/ul&gt;
               &lt;/div&gt;
               
          &lt;/footer&gt;
  
      &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>