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

Scalable Images

Problem? Convert the padding on .cake from pixels to percentages.

I divided the

.cake {
    background-color: #f8748f;
    width: 85.714285714%; /*600px*/
    margin: 1.428571429%;
    padding: 10px;
}

I divided the width of the cake to the 10px padding and tried numbers of way's, but always say's wrong (What the Hell)!

5 Answers

Elliott Frazier
PLUS
Elliott Frazier
Courses Plus Student 9,647 Points

Remember to move the decimal point on your answer down two places.

I had a problem with this one, the method for converting the padding is slightly different to converting the margin.

After pulling my hair out for a while I found that the method for converting padding is in the comments at the top of the code challenge window.

If you're getting a repeating decimal answer make sure to round up to the nearest tenth of a percentage.

I've tried everything and nothing. Still wrong

[posted in the wrong topic and can''t remove my post]