Question: I want to make a div with background image and at the top there will 3 social media icon like this:

What I wanted:
![what i wanted](https://i.stack.imgur.com/AvxiW.png)

```css
div#second-footer-container {
  background-image: url("https://i.imgur.com/0qRwdSI.png");
  width: 100% !important;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  height: 100%;
}

p#socmed-container {
  text-align: center;
}

p#socmed-container a {
  padding: 0 5px !important;
}
```

```html
<div id="second-footer-container">
  <p id="socmed-container">
    <a href="https://www.facebook.com/test/">
      <img id="fb-img" width="25" src="https://i.imgur.com/6ye5lwf.png" alt="Facebook" />
    </a>
    <a href="https://www.instagram.com/test/">
      <img id="ig-img" width="25" src="https://i.imgur.com/SEsRzFL.png" alt="Instagram" />
    </a>
    <a href="https://www.twitter.com/test/">
      <img id="twitter-img" width="25" src="https://i.imgur.com/y8o23cc.png" alt="Twitter" />
    </a>
  </p>
</div>
```

But the result is not look like what i wanted, my result is the background seems to only follow the main-content height:
![result](https://i.stack.imgur.com/8C4fl.png)

I want the width 100% and the height is also 100%, and i want it to be responsive

Answer: 
Use `background-size:contain`

> 
> Scales the image as large as possible without cropping or stretching the image.
> 
> 
> 

[background-size - reference](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size)

```css
body,html{
  height: 100%;
}
div#second-footer-container {
  background-image: url("https://i.imgur.com/0qRwdSI.png");
  width: 100% !important;
  background-size: contain;
  background-repeat: no-repeat;
  height: 100%;
}

p#socmed-container {
  text-align: center;
}

p#socmed-container a {
  padding: 0 5px !important;
}
```

```html
<div id="second-footer-container">
  <p id="socmed-container">
    <a href="https://www.facebook.com/test/">
      <img id="fb-img" width="25" src="https://i.imgur.com/6ye5lwf.png" alt="Facebook" />
    </a>
    <a href="https://www.instagram.com/test/">
      <img id="ig-img" width="25" src="https://i.imgur.com/SEsRzFL.png" alt="Instagram" />
    </a>
    <a href="https://www.twitter.com/test/">
      <img id="twitter-img" width="25" src="https://i.imgur.com/y8o23cc.png" alt="Twitter" />
    </a>
  </p>
</div>
```
Maybe this is what you need:

```css
#second-footer-container{
  background-image: url("https://i.imgur.com/0qRwdSI.png");
  width: 100% !important;
  background-size: contain;
  background-repeat: no-repeat;
  height: 100%;
  min-height: 200px;
}
#socmed-container{
  text-align: center;
}
#socmed-container a{
  padding: 0 5px !important;
}
```

```html
<div id="second-footer-container">
  <p id="socmed-container">
    <a href="https://www.facebook.com/test/">
      <img id="fb-img"
           width="25"
           src="https://i.imgur.com/6ye5lwf.png"
           alt="Facebook"
       />
    </a>
    <a href="https://www.instagram.com/test/">
      <img id="ig-img"
           width="25"
           src="https://i.imgur.com/SEsRzFL.png"
           alt="Instagram"
       />
    </a>
    <a href="https://www.twitter.com/test/">
      <img id="twitter-img"
           width="25"
           src="https://i.imgur.com/y8o23cc.png"
           alt="Twitter"
       />
    </a>
  </p>
</div>
```