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

CSS

help

Using .cake as your context, convert the width of .filling from pixels to percentages (using the comments as a guide).

my code:

  .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;
   }

http://teamtreehouse.com/library/build-a-responsive-website/creating-a-fluid-foundation/converting-pixels-to-percentages

1 Answer

Hi Lyric,

Your percentages are all correct. However, you have padding and margin on your elements which don't show up in the challenge.

Also, the pixels listed in the comments are different from the link you gave.