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
Jeff Hendrickson
Courses Plus Student 1,542 PointsChanging from Pixels to Percentages
This is really getting frustrating. You do the calculation and put in your number, and it tells you you messed up. Sometimes it's just a matter of how many places you go to the right. I've done one now 5 different ways and I'm still stuck.
Anyone know a good rule of thumb for how many places to carry out, or when to round up - if that's even allowed.
Thanks, Jeff
Jeff Hendrickson
Courses Plus Student 1,542 PointsHey Brandon, The Scalable Images challenge in Creating a Fluid Foundation. I've had the problem with others as well. It really takes the fun out of taking these courses.
Thanks, Jeff
1 Answer
Brandon Barrette
20,485 PointsRemember that the context for padding is the actual element width (since padding is inside) and context for margin is the width of the parent element (since margin happens outside)
So for that one, they want padding for cake to be converted. Since cake is 600px, it's 10/600.
If you use the icing width (of 700px) it won't work for you. You would use the 700 if you are converting the margin for cake.
Jeff Hendrickson
Courses Plus Student 1,542 PointsThanks, Brandon. I'll go back through and recheck my calculations. That might be my problem.
Tks, Jeff
Brandon Barrette
20,485 PointsBrandon Barrette
20,485 PointsWhich one are you working on that you are getting the wrong answer? This challenge frustrated me the other day.