background preloader

Design

Facebook Twitter

Designs

CSS Negative Margins - Part One. Set for printing Of all the pieces of the CSS box model , margins are probably the easiest to grasp. The margin is the transparent space outside the borders of a box that pushes other elements away from that box. But this is really only part of the definition. When you give a margin a negative value, it's a whole other ball of wax! This article will explain how negative margins work and begin to explore some of their uses. A following article will explain how negative margins can be used in float-based layouts to to achieve some interesting effects. Margins are one of the few properties that can be given a negative value. These divs have the following CSS properties: #div1 { width: 300px; height: 100px; border: 2px solid #f00; #div2 { border: 2px solid #00f; Note: If you look at the source code for this page, you will notice that there left margins set on the two divs.

Note that there is no margin set, so the margin values for each of the divs default to zero. Margin-bottom: 30px; Top Ten Web Design Mistakes of 2005 (Jakob Nielsen's Alertbox) Color Blender. Paul Kadysz.com. Google, Yahoo and Adobe Flash Crawling Experiment - Flash 'n' SEO Indexing. Open Design Community - Download Free Web Design Templates - OpenDesigns.org. BrainJar.com: Experiments in Web Programming. SnitchKiller | Snitch Killer Apparel. The Man in Blue > Distilling fine web design since 1863. - Web 2.0 Central: Web2.0, Ajax, Beta, Alpha, Startup, Companies.