The Lab

1. Jan 2012

Using outlines for pixel perfection

Being a front-end professional you probably like being in control of your HTML elements (I know I do!). A little helper I tend to use is the CSS outline property.

Outlines will outline your HTML elements without affecting the box model. They're just there!

By applying outlines you'll see where your elements span, and you'll quickly spot misplaced elements and overly sized paddings. Now you can easily position all your elements to pixel perfection!

* { outline:1px solid green; }
Back to Grimsrud Interaktiv