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 trialBen Brenton
266 PointsWhy isn't it good to use negative margins?
In my current project I am using negative margins quite a bit as they are proving handy, but Guil seems to suggest they are not considered a common technique. Should I be relying on them or should I be using normal values where possible?
1 Answer
Robert Richey
Courses Plus Student 16,352 PointsHi Ben Brenton,
I don't have a definitive answer, but I'll hazard a guess that negative values of any kind would be discouraged because they are more confusing to reason about than positive values.
If you had to debug / maintain someone else's code, would you find it more enjoyable - easier to reason about - if values were positive or negative?
Ben Brenton
266 PointsWhat do you mean by "reason about"?
Robert Richey
Courses Plus Student 16,352 PointsIn this context, I'm using it interchangeably with "understand".
Konrad Pilch
2,435 PointsKonrad Pilch
2,435 PointsI don tthink if this will answer your quesiton but what ill say is that when i use frameworks the margisn are often negative? but ti works pretty fine . Maybe thats something for more advanced people? i don tknow , i never use negative margins really too .