Dave Woods - Freelance Web Design Warwickshire

CSS negative margins

Negative margins can be really useful when used correctly but can are often avoided because they’re seen as a hack or work around to other CSS problems. However Smashing Magazine have put together a useful article which explains how they can be used to good effect.

Personally, I don’t tend to use negative margins all that often as I’d usually use a combination of relative and absolute positioning to create the same effects as those mentioned in the article on Smashing Magazine but as a CSS developer it’s important to understand all aspects of CSS so if you haven’t encountered negative margins in the past then it’s definitely a good article to have a read through.

If nothing else, it adds another tool to your CSS toolbox which can only be a good thing.