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
Pia Mancini
1,174 Pointshelp - Quiz - Converting pixels to %
Hi! Is anyone else having trouble with the second task in Make a Responsive Website, Creating a Fluid Foundation? It can't seem to get it right, but I can't think of anything else and I'm doing the same formula (px/context x 100) I'm copying the question and my answer:
Using .cake as your context, convert the margins on .filling from pixels to percentages.
.cake { background-color: #f8748f; width: 80%; /640px/ margin: 1.25%; padding: 10px; } .filling { background-color: #4FB69F; width: 75%; /480px/ margin: 10px; padding: 10px;
The answer I think should be is: 10/640 x 100 = 1.56%
Any hints will be much appreciated!
3 Answers
Gary Mann
8,639 PointsYou're doing it right. There's just no need to round.
10/640 = 0.015625 (or 1.5625%)
It seems the quiz is accepting 1.5625% or a round to 1.563%, but not a round to 1.56%.
Pia Mancini
1,174 PointsThanks Gary, I tried 1.562% and wasn't working either, that's when I thought I had it wrong. 1.563% worked. Cheers.
Harleigh Abel
4,547 PointsI've been having the same issue. How frustrating. If they are going to be that specific it should be stated in the question that they are looking for an answer with to the thousandth of a percent. :(