border: 1px solid red;

2007-01-29

When you are creating a design in css, you will often run into various problems. The problem is that you often don’t really know where the problem is. That’s where the problem is.

I was using “border: 1px solid red;” to determine where certain element was. This has several drawbacks… first, it adds 1px on each side of the element, which can cause problems, then it is not too easy to work with (you have to manually add it to every element that you want to highlight).

I have found a much better way to debug css. First, they use outline instead of border (duh), then they make very smart use of wildcard characters, so that out-commenting one thing gets all the css boxes highlighted. Priceless.

← Project Gutenberg Amarok →

2 thoughts on “border: 1px solid red;”

2007-01-29

firebug rules 8)

tasuki 2007-01-30

No link… no name…

Firebug seems pretty neat, but it’s only for firefox… the css version works in all browsers (surprise, it’s usually IE that gets it wrong and I still need to find out where the problem is)

Add your commentHow does this work?