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

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]