Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Jeffrey Hall](https://uploads.teamtreehouse.com/production/profile-photos/416502/micro_Creepy.jpg)
Jeffrey Hall
9,065 PointsCSS Background Image Issue
Hi all,
So I'm trying to build out my first website on my own and am trying to use a specific paper background to put behind my paragraphs. However, I can't seem to figure out how to make the image cover the entire text with the image without making it repeat or appear incomplete.
I'm currently using the following code in the class .news
.news p { background-image: url("img/paper_03.gif"); background-size: contain; background-repeat: no-repeat; }
This leaves the image truncated and only covering up 1/4 of the paragraph.
I've tried background-size: cover to no avail either. Any suggestions would be greatly appreciated!
Thanks,
Jeff
2 Answers
![Jesse Zelaya](https://secure.gravatar.com/avatar/78659b4255e35d50c19dcfa2468b1ec3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jesse Zelaya
13,599 PointsPerhaps adding the background-clipping property?
background-clipping: content-box;
![Ricardo Hill-Henry](https://uploads.teamtreehouse.com/production/profile-photos/134316/micro_6618D5BA-D290-40A7-ADA4-B0B5CC46FD2C.jpg)
Ricardo Hill-Henry
38,442 PointsTry making a empty div to contain the background image. Give that div a set desired height, and place the background property inside of it. You can then place your text inside the div and position it as you like.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Jeffrey,
What result did you get with
background-size: cover;
? That should have did it for you.