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 trialMuhammad Rizwan
8,595 PointsFinally, give .wildlife the property and value that forces any padding and border widths into its total width and height
Finally, give .wildlife the property and value that forces any padding and border widths into its total width and height
/* Complete the challenge by writing CSS below */
.wildlife {
background-image: url(img/bear.jpg);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
width: auto;
height: auto;
}
<!DOCTYPE html>
<html>
<head>
<title>Lake Tahoe</title>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="primary-content t-border">
<p class="intro">
Lake Tahoe is one of the most breathtaking attractions located in California. It's home to a number of ski resorts, summer outdoor recreation, and tourist attractions. Snow and skiing are a significant part of the area's reputation.
</p>
<a class="callout" href="#more">Find out more</a>
<div class="wildlife">
<h2>Check out all the Wildlife</h2>
<p>
As spawning season approaches, the fish acquire a humpback and protuberant jaw. After spawning, they die and their carcasses provide a feast for gatherings of <a href="#mink">mink</a>, <a href="#bears">bears</a>, and <a href="#eagles">bald eagles</a>.
</p>
</div><!-- End .wildlife -->
<a class="callout" href="#wildlife">See the Wildlife</a>
</div><!-- End .primary-content -->
</body>
</html>
19 Answers
mikes02
Courses Plus Student 16,968 PointsNot sure what the exact challenge is but have you tried box-sizing?
.wildlife {
box-sizing: border-box;
}
Justin Senne
9,011 PointsI'm not the OP, but this is how I passed the task.
Andy Hammond
5,415 PointsThanks! Its going to take some work getting used to all of these properties and values! Lot's to learn!
yazan hussein
Courses Plus Student 4,525 Pointsthanks for the help
Konrad Pilch
2,435 PointsGive your self best answer, so we know its solved by seeing best anser :D and ud just gain your self 40points :D
Anna Takang Nchongarrey-Oben
7,365 PointsThanks a lot. This worked for me
Awais jamil
Java Web Development Techdegree Student 4,742 Pointsthanks
David Danko
1,415 Pointsyup this works :DDD
Jason Hess
4,789 PointsI've tried box-sizing: border-box; twice now and it's not working. Seems to be working for others but maybe I'll just try a refresh and start over. Seems to me like it's a trick question because the entire video is about background-image property and values and the box-sizing property was covered in the previous video.
Toby DeGrandpre
1,530 PointsThank you! This worked for me. I take 3x as long to complete the videos b/c I take extensive notes (helps me remember). I do not have this anywhere in my notes. I think, possibly, it wasn't in the CSS track that I am taking.
Miika Vuorio
8,018 PointsThat's exactly what I put there on my first try. I've refreshed the page and it still doesn't work.-
Alexander Ayala
4,023 PointsI def was stuck until I found this thread! Thx!
Caleb Burley
976 PointsYes, this works for the challenge. Thanks!
Ryan Rassoli
3,365 PointsCould anyone please explain to me what the box-sizing property does?
Marc-André Beaulieu
Courses Plus Student 3,634 PointsYou're the man. I had the same issue at this exercice. Its really a property that it isn't intuitive. Thank you for the answer.
Jack Guy
1,299 PointsYeah I had to re-watch 3-4 videos and still didn't come across the answer. We had only used this property once before!?
Acie Slade
Front End Web Development Techdegree Student 10,895 PointsI was also stuck here. Thank you all!
MUZ140663 Question Ngwarati
11,782 Points.wildlife {box-sizing:border-box;}
asked to do so aswell!
Richard Targett
4,960 PointsThanks this is helping me too. Practice makes perfect -_-
Sara Victoria
1,249 Pointsthank you...me too.
MUZ140663 Question Ngwarati
11,782 Pointsthanks Mikes02 was stack buddy .wildlife {box-sizing:border-box;}
Keneque Thomas
4,147 Pointsthank you lol
Gustavo Strogonoff
1,249 PointsThanks mikes02! :D
Chris de Ronde
2,165 PointsThanks!
christofer serrano
2,983 PointsYeap So far on the lesson we saw the box-sizing property only once. But thats why it is a challenge jeje!
Niels van den Bergh
2,948 PointsMee too thanks!
Amari Ashwood
1,746 PointsThank you so much, guys!
Taylor Durkin
4,832 Pointshelped me too, my first issue in this whole course!
Sofian Zahir
3,502 Pointsthank you
shane smith
5,247 PointsThanks all great help for me?
Lukas Bunn
2,666 Pointsnone of these worked for me, i finally figured it out, it was
background: #ffa949 url('img/bear.jpg');
Kevin Tempel
4,689 PointsThank you!
Kaisha Jones
6,366 Pointsthank you!
Ryan Moody
20,499 PointsRyan Moody
20,499 PointsThank you!