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 trialClifford Cashatt
5,056 PointsIs anyone else having trouble with Task #2 in this code challenge?
The challenge question is:
Using .cake as your context, convert the margins on .filling from pixels to percentages,
It seems that the task should yield an answer of "margin: 1,56%;. I derived at my answer by using 10 (margin of .filling) / 640px (original pixel width of .cake) = .015625 after moving the decimal I get 1.56% as the new margin value. However, that creates a "bummer" message.
2 Answers
Philip Benton
1,378 PointsYou have rounded the answer which you do not need to do, i.e you have dropped the last 2 digits.
The answer should be 1.5625%
10 / 640 = 0.015625 * 100 = 1.5625%
Clifford Cashatt
5,056 PointsThanks Philip!
Philip Benton
1,378 PointsYou're welcome, don't forget to mark this as answered.