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

Responsive Web Development

} .container { max-width: 800px; }

  .icing {
    background-color: #B4C34F;
    width: 100%; /*800px*/
    padding: 10px;
  }
  .cake {
    background-color: #f8748f;
    width: 80%; /*640px*/
    margin: 1.25%;
    padding: 10px;
  }
  .filling {
    background-color: #4FB69F;
    width: 75%; /*480px*/
    margin: 10px;
    padding: 10px;
   }

In the above code, I am to convert the .filling margin pixels into percentages. The context is the .cake. I tried doing 10px / 640px and got 1.56%. This seems to be incorrect. Need of some help, please!

never mind, it was because i rounded the answer. thanks anyway

1 Answer

Robert Goddard
Robert Goddard
15,019 Points

I ran into this yesterday, too :) Some of those checkers they use are a little too strict :)