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

HTML Build a Responsive Website Creating a Fluid Foundation Scalable Images

Paul Keenan
Paul Keenan
702 Points

building a responsive design, padding issue converting to %

I'm using the understanding that to convert the px to % on the padding I would using the following workout as the .icing width in pixel is 700px my workout being 10px / 700px = 0.01428571428571 therefore the padding would be set to 1.428571428571% yet I keep getting advised its incorrect I've even tried 1.428571429% and still getting the same incorrect answer. Please can you advise where I'm going wrong?

2 Answers

Calvin Nix
Calvin Nix
43,828 Points

Hey Paul,

I believe that you should re-evaluate the width of the containing element. Keep in mind this is for padding. In other words if I remember correctly from that project 700px was not the correct size to use. I think that the width that I used was the width of the content that I was providing padding to.

Hope this helps.

Hey Paul Are you sure you are using what they set as the context for that formula to work?

Also I found this online Target / Context = Result calculator helpful http://responsv.com/flexible-math/