# How can I make this image the background

**URL:** <https://forum.freecodecamp.org/t/how-can-i-make-this-image-the-background/82084>\
**Category:** General\
**Created:** [January 30, 2017, 5:45pm UTC](https://forum.freecodecamp.org/t/how-can-i-make-this-image-the-background/82084 "2017-01-30T17:45:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lindavbyrne](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lindavbyrne/32/27303_2.png) [@lindavbyrne](https://forum.freecodecamp.org/u/lindavbyrne)\
**Post date:** [January 30, 2017, 5:45pm UTC](https://forum.freecodecamp.org/t/how-can-i-make-this-image-the-background/82084/1 "2017-01-30T17:45:40Z")

</div>

Hi, I’m trying to make the image on the front page a background image for that section. Please help. Here is the Code Pen link

> **[bgaggX](https://codepen.io/LVB/pen/bgaggX)**
>
> ...

---

<div class="post-metadata">

**Author:** ![naeemrind](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/naeemrind/32/35984_2.png) [@naeemrind](https://forum.freecodecamp.org/u/naeemrind)\
**Post date:** [January 30, 2017, 6:01pm UTC](https://forum.freecodecamp.org/t/how-can-i-make-this-image-the-background/82084/2 "2017-01-30T18:01:18Z")

</div>

First delete the img tag from your HTML Markup.  
Then add this Rule to your stylesheet. You can change the body selector to your desired section class or id.

```auto
body {
     background: url(http://stockpictures.io/wp-content/forum/uploads/2016/05/macbook-laptop-books-desk-wood-notepad-pencil-eraser-drawing-iphone-textbooks-768x515.jpg);
     background-repeat: no-repeat;
     background-position: center;
     background-attachment: scroll;
   }

```

You can play around with the image properties like repeat, position, attachement etc.  
This is a low resolution image, you should choose an image with a resolution of at least 2k.

---

<div class="post-metadata">

**Author:** ![lindavbyrne](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lindavbyrne/32/27303_2.png) [@lindavbyrne](https://forum.freecodecamp.org/u/lindavbyrne)\
**Post date:** [February 1, 2017, 10:44am UTC](https://forum.freecodecamp.org/t/how-can-i-make-this-image-the-background/82084/3 "2017-02-01T10:44:11Z")

</div>

Thank you so much! Really appreciate you taking the time to help

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 16, 2021, 5:12pm UTC](https://forum.freecodecamp.org/t/how-can-i-make-this-image-the-background/82084/4 "2021-01-16T17:12:07Z")

</div>

Closed on January 16, 2021, 5:12pm UTC


