PDA

Click to See Complete Forum and Search --> : border-collapse bug - DIV layers


BShadow
Dec 2nd, 2002, 03:47 AM
Hello fellow developers,

The situation:
We have multiple div layers on top of each other. With the use of java script we can create tab's that reveal layers when clicked on. We have on some of the layers, a table in an iframe. This is because the table is heavily modified and serves and a new sortof object.

The problem:
The problem is that when I set the tables border in my style sheet to collapse { border-collapse: collapse; } the borders 'shine trough' the div layers. In the top layer I can see the inner borders of my table object. When set to none, I do not see the borders.

Can anybody help me out, I havn't had any luck finding this problem on the web, so maybe someone has had this too and hopefully fixed it?

Thank you in advance.

Rick Bull
Dec 2nd, 2002, 05:45 AM
I think (and this is going from memory) that this is an IE bug, and you may be able to fix it by having no white space around the cell:


<td>No White-space
on either side of cell</td>

BShadow
Dec 2nd, 2002, 06:10 AM
<td>No White-space
on either side of cell</td>

??? Will this put no white-space around the cells? I think I don't get it.

<td> with no additional properties will make sure there is no whitespace in around my cells?

The clue is that here at work, they use vaiable width's etc. So I can not only use <td> I need <td width="" class=""> etc. Could this create whitespace around my cells, or maybe there is a command that could make sure this white-space is eliminated?

Thank you for your help!

BShadow
Dec 2nd, 2002, 06:18 AM
Originally posted by Rick Bull
I think (and this is going from memory) that this is an IE bug, and you may be able to fix it by having no white space around the cell:


<td>No White-space
on either side of cell</td>



I just thought about something... We do use padding, would this be equal to the white-space you're talking about?

Rick Bull
Dec 3rd, 2002, 05:03 AM
Sorry i think I may have missunderstood your original question. Have you tried your page in different browsers, it sounds like it maybe a browser-specific bug.

BShadow
Dec 3rd, 2002, 05:35 AM
We support only IE... Don't sue me ;)

The problem is that when multiple layers of DIVs are on top of each other the table objet with the border-collapse: collapse; will shine trough...

White lines are visible on other div's that are visible. Those lines should not be visible because the div with the table is not visible...

Thx...

phpman
Dec 3rd, 2002, 09:30 AM
maybe border-collapse is not valid with visibility: hidden of the layer.


and I am pretty sure border-collapse is an IE only thing.

BShadow
Dec 3rd, 2002, 09:55 AM
That could well be the problem, but how do I fix this? Just don't set the layer to hidden and set the other layer on top with z-index?

Hmmm...

Thx

phpman
Dec 3rd, 2002, 10:04 AM
but if you do that, wouldn't it till show through?

just can't use border-collapes in that table. other than that I can't think of another way.

BShadow
Dec 3rd, 2002, 10:54 AM
:(

I hope this will be fixed in IE 7...

Rick Bull
Dec 3rd, 2002, 01:55 PM
Originally posted by phpman
and I am pretty sure border-collapse is an IE only thing.

It is in the W3C's CSS spec, and it's supported in Moz and Opera.

Can't you just set the border-collapse to seperate with javascript when you set the visibility on the table? I think you may need to use something like tableObject.style.borderCollapse = 'seperate';

phpman
Dec 3rd, 2002, 02:06 PM
Originally posted by Rick Bull
It is in the W3C's CSS spec, and it's supported in Moz and Opera.

Can't you just set the border-collapse to seperate with javascript when you set the visibility on the table? I think you may need to use something like tableObject.style.borderCollapse = 'seperate';
funny you say that, I believe I tried with NS7 and it didn't go so well. I will double check as I am using it on one of my sites but have to wait until I get home.

BShadow
Dec 4th, 2002, 01:52 AM
Originally posted by Rick Bull
It is in the W3C's CSS spec, and it's supported in Moz and Opera.

Can't you just set the border-collapse to seperate with javascript when you set the visibility on the table? I think you may need to use something like tableObject.style.borderCollapse = 'seperate';

Hmmm, woudn't that be in reverse order? I set the table to seperate in the CSS and in the javascript, when visible, I'll set it to collapse?

Could work...

Rick Bull
Dec 4th, 2002, 05:15 AM
Yeah that's what I meant, I think :D