View Full Version : What are you views on negative margins?

06-06-2009, 06:24 PM
To date, the ONLY truly semantic minimalistic validating layout that controls heights of columns with no hacks or extra markup that I have found uses negative margins. I want to know what the general community really thinks of negative margins before I implement it.

I've heard conflicting views on whether it is appropriate to use negative margins. Here for example: http://www.bennadel.com/blog/1174-Negative-CSS-Margins-Are-Not-Cool.htm?&_=0.15954031921355138#comments_18024

This guy states that it is better to use negative margins for quick little fixes like titles and such rather than using it for main layout manipulation.

However, in this article here http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/, the author stresses that negative margins should not be used to fix the mistakes that we make, like moving titles around, but instead is appropriate and valid for main site layout.

Has any globally recognized group ever commented on this issue? The general consensus is that we shouldn't be using tables for layouts, what about negative margins?

What do you think, are they appropriate? If so when? If not, why?

06-07-2009, 12:00 AM
I didn't know anyone disapproved of negative margins.

Okay, they can be overused a bit, and so carry the same stigma as absolute positioning. But it's silly to not use them if it's the simplest course of action; it's a valid layout technique.

06-07-2009, 12:07 AM
If there were a good reason not to use them, they wouldn't be conforming.

06-08-2009, 05:52 PM
Sutha, either that was a spam post, or you ought to clarify what on earth you mean. It's your very first post, your grammar makes it hard to know what your point is, and the random link, well that has nothing to do with our conversation. So either add something meaningful or I will alert the admins that there is another spammer on board.

Gsnedders, do you know of any reasons why we shouldn't use them? Just curious.