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

Convert the margins on .cake from pixels to percentages.

Hi,

I'm having problems with margin and NOTHING that I do works. The code that I entered was 10px divided by 640px which gave me 0.015625 I moved the decimal point 2 places to the right and came to 1.56% - no joy. So I tried 10px divided by 800px for the container, came to 0.0125 and still no joy.

I even tried 640px divided by 800px and came to0.80 again moved the decimal 2 places to the right came up with 0.8 or 80%, then tried 800px divided by 6740px and got 1.25, however that would be after moving the decimal point 125%.

Simply put I can't see any other way around this, can someone shed some light on where I'm going wrong on this please?

Many thanks.

2 Answers

Can you link me to the video or test you are trying to do?

Hi Daniel,

Thanks for getting back to me on this, somehow I managed it, I feel that some of these videos are too rushed and don't quite go into the necessary detail that I'd like, or maybe that's just me. Anyway, thanks for trying to help !!!

Martin

Martin Forbes , Ok no worries always happy to help if i know the answer. Glad to hear you figured it out. I sometime struggle with them it doesnt hurt to watch the video a couple more times.