td inner border

H

Haris Bogdanoviæ

Hi.

I have a table 10*10 but there is no border around table cells.
The border appears when I put something in a cell.
How to make a cell border visible when cell is empty ?

Thanks
 
M

MG

Haris Bogdanoviæ said:
Hi.

I have a table 10*10 but there is no border around table cells.
The border appears when I put something in a cell.
How to make a cell border visible when cell is empty ?

Thanks

Put   in the cell

MG
 
E

Evertjan.

MG wrote on 22 jul 2010 in comp.lang.javascript:
Put   in the cell

In this NG you should give a Javascript solution:

var tbls = document.getElementsByTagName("table");
for (i=0;i<tbls.length;i++)
for (j=0;j<tbls.rows.length;j++)
for (k=0;k<tbls.rows[j].cells.length;k++)
tbls.rows[j].cells[k].innerHTML += '&nbsp;';
 
D

Denis McMahon

I have a table 10*10 but there is no border around table cells.
The border appears when I put something in a cell.
How to make a cell border visible when cell is empty ?

1) Ask in an html authoring group.
2) Put something in the cell.
3) The html authoring group might suggest what to put in the cell (I
know what I'd use, but if I suggest it here I'll probably get shot down
in flames).

Rgds

Denis McMahon
 
S

SAM

Le 7/22/10 8:17 PM, Haris Bogdanoviæ a écrit :
Hi.

I have a table 10*10 but there is no border around table cells.
The border appears when I put something in a cell.
How to make a cell border visible when cell is empty ?

with a stylesheet ?

table { empty-cells: show }

or

<table style="empty-cells: show">
 
S

SAM

Le 7/22/10 9:09 PM, Evertjan. a écrit :
MG wrote on 22 jul 2010 in comp.lang.javascript:


In this NG you should give a Javascript solution:

You should but you haven't if is not of circumstance ! :-(
There is no need of &nbsp; anyway.

var tbls = document.getElementsByTagName("table");
for (i=0;i<tbls.length;i++)

for( var i=0, n = tbls.length; i<n; i++)
tbls.style.emptyCells = 'show';

for (j=0;j<tbls.rows.length;j++)
for (k=0;k<tbls.rows[j].cells.length;k++)
tbls.rows[j].cells[k].innerHTML += '&nbsp;';


why finally adding an unbreakable space everywhere ?

if(tbls.rows[j].cells[k].innerHTML == '')
tbls.rows[j].cells[k].innerHTML = '&nbsp;';


Mais c'est vraiment n'importe quoi !
de l'obscurantisme JavaScript !
 
E

Evertjan.

SAM wrote on 24 jul 2010 in comp.lang.javascript:
<table style="empty-cells:show">

1 Doesn't work in my IE8.

2 Not needed in Chrome.

Is this a FF solution only?

3 OT, not JS.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top