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

Bethany Cooksey
Bethany Cooksey
14,242 Points

Convert the Padding on .Cake from Pixels to Percentages

The challenge starts out like this:

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

So then I divide 10 by 600 (0.01666666666) , and then move the decimal point (0.1666666666). Then I add the percent mark. It then says there is a problem with my calculations. Does anybody know what I am doing wrong? I tried to figure it out on my own, but it didn't work. I looked at all the forum discussions before I posted this. Thank you so much!

2 Answers

Bethany Cooksey, you just need to move the decimal point over 2 places instead of 1 to convert to percentages.

Bethany Cooksey
Bethany Cooksey
14,242 Points

Oh, thank you! God bless you!