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

CSS

how do you define the background property and value that prevents the background image from repeating in any direction

backgrounds

7 Answers

Hi ! Use background-repeat: no-repeat; http://www.w3schools.com/cssref/pr_background-repeat.asp

You use - background-repeat: no-repeat; along with - background-size: 100%; if you do not want stretching of the image to occur.

it keeps telling an error if I do that

it keeps telling an error if I do that

show your code so I can look at it ;)

Hi mate! Please paste your code here or make a snapshot of your framework and paste it here so we can help you out! If you are gettin' an error, maybe you have a sintax problem or something else going on!

.wildlife { background-image: url('img/bear.jpg') }

.wildlife { background-image: url('img/bear.jpg') background-repeat: no-repeat; background-size: 100%; }

you miss a ; after the url()