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.
(BUG)Using .icing as your context, convert the width of .cake from pixels to percentages (using the comments as a guide).
I divide 500(target) and divide it by 400 (width) and get 1.25% then move it over two places to get 125% and it keeps marking me wrong?!?!?! why??
Jeremy Stenseth16,916 Points
If the container is 500 px wide and you want the element to take up 400 px You need to divide 400 / 500 which gives you .80 or 80% By dividing the other way 500 / 400 which is 1.25 or 125% you would make the element 1.25 times bigger than the container.
o wow! I tried .8, but not that thanks Jeremy!