CSS - Negative Margins

Using negative margins, we can achieve the width of 100% - 200px.

Margins (and thus, negative margins) are handled differently for floated and inline elements than they are for non-floated block-level elements. The negative right margin has more to do with allowing the sidebar to float up into this element's space than it does with any positioning / appearance of the element itself.

Now, we need to push the content area away from the right side of the document. We do this by adding another div. We add right margin of 200px to this div, which should place it just where we need it and separate from the sidebar.

Creating Liquid Layouts with Negative Margins
The Definitive Guide to Using Negative Margins

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License