border: 1px solid red;


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.

Posted on 2007-01-29 at 9:15 pm, filed under programming. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

2 Responses to “border: 1px solid red;”

  1. Anonymous says:

    firebug rules 8)

  2. tasuki says:

    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)

Leave a Reply

Because this post is too old and I'm getting a lot of spam on old posts, only registered users can post a comment here.