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

Design

can anyone get this?

suddenly, I don't get it. what is the answer to this simple question? Thanks for your thoughts!

Using .container as your context, convert the width of .icing from pixels to percentages.

the question is found found here: http://teamtreehouse.com/library/websites/build-a-responsive-website/creating-a-fluid-foundation/converting-pixels-to-percentages-2

10 Answers

James Barnett
James Barnett
39,199 Points

@Dave - The formula is target / context = result that converts pixels to ems.

If you want to convert pixels to percentages you need to convert your decimals to percentages by moving the decimal point 2 places to right or, by multiplying by 100, which would be target / context = result * 100

This was covered in the video starting at around 2:47.


For reference the instructions are:

Using .container as your context, convert the width of .icing from pixels to percentages.

So in this case the target is width of the .container and context is the width of .icing.

Let us know if you have any more questions.

500 / 500 = %

Thank you so much for your comment! Did you check that answer? I did and it said my calculations were a bit off. I wish they would give me a clue - like Nick did when I wasn't right - so that I could learn more and go to the next question. Please let me know if 500/500 was approved for you. Thank you again!

samiff
samiff
31,206 Points

500/500 is right, but that gives you a decimal number which you then need to convert to a percentage (multiply your result by 100 to do so). That would give you an answer of 100% in this case which should check out.

James - thanks for your answers! I'm looking forward to jumping back into it tonight.

thanks to everyone with your patient and well written answers for my vexing question. I am very impressed by team treehouse and by you all...

Hey Dave,

Is it working for you now? If you're still having trouble email me at help@teamtreehouse.com :) please include a screenshot of the code challenge while you're working on it and a link to the challenge.

Hope you're having a great weekend!

James Barnett
James Barnett
39,199 Points

@Elizabeth - It would be great if we could get a Mark as Completed button so those of us that haunt the forums regularly would know that an issue has been successfully resolved.

Absolutely agree! We are developing a lot of new features for the site and forum. I'm not 100% sure if this in the pipeline, but I do know it has been suggested and sent to the Product team for review.

I've been incorporating a few of the helpful posts that members have added to the Forum in my email responses, and bookmark posts when possible for members who have similar questions/issues and so forth.

Again, truly, you guys are so great. Thank you for helping cultivate this community and helping it grow :)

Your comments did successfully resolve my issue and I've moved forward. Thanks again all.