Cory's Weblog

Sunday, May 18

As I've been redesigning my blog template, I've noticed that when you combine two boxes with a 1-pixel border, the result is a 2-pixel line between the boxes. Thanks to the guys at Sitepoint, I'm now aware that the border-collapse property in CSS-2 will take care of this, as seen below: table { border-collapse: collapse; } td, th { border: 1px solid black; } According to Sitepoint, "The border-collapse property instructs the browser to combine the borders of adjacent table cells, collapsing them together according to a set of precedence rules described in the CSS2 Recommendation. Browsers that support this include Internet Explorer 5 for Windows, Netscape 6, Mozilla, and Opera 7."

0 Comments:

Post a Comment

<< Home