View Full Version : border-collapse
I'm trying to style a table using only CSS (no cellpadding, etc. attributes), and I'm struggling with border-collapse.
I want the borders to be collapsed, and I've applied border-collapse: collapse; to <table>, and specified a 1px border to <td>, but the borders don't collapse (Moz. 0.9.8/MacIE5.1).
I've been googling about trying to find the answer to this, but I've come up blank.
Does anyone know if I'm missing something obvious, or if browsers dont yet support border-collapse?
Icestorm
13.02.2002, 09:42
It should just work, do you have a page we can take a look at?
[url="http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/bordercollapse.asp"]MSDN[/url:ienu6vywwe] says it should work in macie5, btw.
As far as I can see, this page should work:
http://www.10thcircle.com/tabletest.html
...but it doesnt.
and - in fact - the MSDN example doesnt work on Moz or MacIE. Our PC is in bits at the minute, so I can't check PCIE.
Edited by - influx on 02/13/2002 17:34:30
Works on IE6/WinXP, but not Moz 0.9.6 WinXP.
I think border-collapse is one of those CSS attributes that have not been implemented too well on any platform.
It's a pain, but you might want to define two or three TD classes that don't have borders on certain sides:
td.top-n-left {
border-top : 1px solid black ;
border-left : 1px solid black ;
}
td.top-n-right {
border-top : 1px solid black ;
border-left : 1px solid black ;
border-right : 1px solid black ;
}
td.bottom-n-left {
border-top : 1px solid black ;
border-left : 1px solid black ;
border-bottom : 1px solid black ;
}
td.bottom-n-right {
border : 1px solid black ;
}
It not in the spirit of CSS and styling, but it should work on any CSS browser. Substitute your own class names (so they are not layout specific)...
Tom Trenka
Edited by - ttrenka on 02/13/2002 10:19:29
vBulletin® v3.6.7, Copyright ©2000-2008, Jelsoft Enterprises Ltd.