Simon Willison’s Weblog

CSS Trickery

New CSS Experiment: Trickery with Floats and Negative Margins, inspired by this message on css-discuss. By applying both position: relative and a negative margin to a floated element it is possible to pull it out of the flow of text in to the margin of the document. I have used a variant of this technique in the third revision of my SitePoint in CSS demonstration.

This is CSS Trickery by Simon Willison, posted on 15th August 2002.

Next: Hacking Las Vegas

Previous: Fun with FOLDOC

Previously hosted at http://simon.incutio.com/archive/2002/08/15/CSSTrickery