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
MUZ140019 Nqobile Nyathi
1,074 Pointshow do you define the background property and value that prevents the background image from repeating in any direction
backgrounds
7 Answers
pi R
12,720 PointsHi ! Use background-repeat: no-repeat; http://www.w3schools.com/cssref/pr_background-repeat.asp
mitchelloldfield
6,420 PointsYou use - background-repeat: no-repeat; along with - background-size: 100%; if you do not want stretching of the image to occur.
MUZ140019 Nqobile Nyathi
1,074 Pointsit keeps telling an error if I do that
MUZ140019 Nqobile Nyathi
1,074 Pointsit keeps telling an error if I do that
pi R
12,720 Pointsshow your code so I can look at it ;)
Julian Aramburu
11,368 PointsHi 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!
MUZ140019 Nqobile Nyathi
1,074 Points.wildlife { background-image: url('img/bear.jpg') }
MUZ140019 Nqobile Nyathi
1,074 Points.wildlife { background-image: url('img/bear.jpg') background-repeat: no-repeat; background-size: 100%; }
pi R
12,720 Pointsyou miss a ; after the url()