Site Navigation

May 30, 2010

CSS Tip: Remove Part of a Border

CSS ButtonOften when working with a box thingy, you want a border on 3 sides, but not four. Normally, you would code that with something like this:

border-top:1pt solid black;
border-right:1pt solid black;
border-left:1pt solid black;

Instead of doing this, create a complete border, then eliminate one side. For example:

border:1pt solid black;

Now you have a three sided box with the bottom side eliminated.  Nice. Shout out to for the tip.
Post a Comment

Favorite Links Feed