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

Edward Ulick
2,756 PointsBackground-position values
In the video you leave the initial value of 50% in the expression, like this:
background-position: calc(100% - 40px) calc(100% + 30px), 50%;
What is the purpose of leaving the "50%" in there, it doesn't seem to do anything? I checked MDN, and it says that background position only takes 2 values, and x and y position (or certain keywords). Thanks!
4 Answers

Patrick McKinney
13,151 PointsHe is using two images as the background for .main-header class. The calc() code in background-position is for the rock image, while the 50% is the background-position for the larger image.
I believe using 50% sets both the x and y to 50%.

Rachel Campbell
9,103 PointsThis is how I'm understanding it. The , 50% is for the second background image (header-bg.png). If you change 50% to 100%, for example, you can see the header-bg.png image change position. Change it to 1000% and it disappears off the page completely.
You have: Specifying paths to background-image 1 (the rock) COMMA background-image 2 (the beach). Position value for background-image 1 (the rock) COMMA position value for background image 2 (the beach).
The COMMA , separates the two declarations. And that separation is preserved in the next CSS declaration (for position).

Godfrey M
Courses Plus Student 2,696 Pointsi also have the same question as Edward Ulick, why cant a teacher come in here and elaborate it more. we are all assuming , what is the correct answer ?? after students ,moderator should interact with us, this forum is self taught i think.

Cindy Lea
Courses Plus Student 6,497 PointsIt is 2 values. The first argument uses the calc function that subtracts 2 values for you & puts the result as argument 1. Its just easier to do than using your calculator everytime.

Edward Ulick
2,756 PointsThanks for your reply! I was actually asking why he leaves the "50%" in the code? What I meant was why does he write it like this:
background-position: calc(100% - 40px) calc(100% + 30px), 50%;
as opposed to this:
background-position: calc(100% - 40px) calc(100% + 30px);
Those two rules seem to do exactly the same thing, so why does he leave the 50% there?