Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Build a Responsive Website Creating a Fluid Foundation Creating Flexible Margins

Is 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
Philip Benton
1,378 Points

You 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%

Thanks Philip!

Philip Benton
Philip Benton
1,378 Points

You're welcome, don't forget to mark this as answered.