0

Looking at http://jsfiddle.net/yt76xgk8/ I want to add cellSpacing and cellPadding to my code.

table.setAttribute('border', '5px');
table.setAttribute('cellpadding', '30px');

1) why is the border colour black instead of blue?

2) why does cellPadding work in jsFiddle on my google browser. But when I run the application it doesnt pick up. Tried with google and FF

John
  • 3,965
  • 21
  • 77
  • 163
  • Answer to first question is that the `border` attribute on `table` is the size of the border. What you are trying to do is, assigning a CSS style to the attribute. Anything after `1px` will be ignored. – Abhitalks Nov 12 '14 at 12:23
  • marked as duplicate? but your other answer refers to no code working. I can display a table with a 1px border, just no padding or spacing? – John Nov 12 '14 at 12:58
  • You code (apart from the problem I described in the comment above) works perfectly. In your app, where are you putting the Javascript? – Abhitalks Nov 12 '14 at 13:08

0 Answers0