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.

HTML Build a Responsive Website Creating a Fluid Foundation Creating Flexible Margins

problem

i'm having problems with this margin should it be 10/800 = 0.0125 ???

if so its not working ?

2 Answers

James Ingmire
James Ingmire
11,901 Points

When setting flexible margin on an element, your context is the width of the element's container. When setting flexible padding on an element, your context is the width of the element itself.

Target / Context (so the target is the width of the elements container DIVIDE BY the margin. It looks like you have done it correctly but you need to convert it into a percentage: 1.25%; Hope it helps.

yes, you are right, i completely forgot about it. Tnx James :)