bernd.mielke%snafu.de ef6d9f26bb remove javascript warnings from table testcases bug 62965 r=karnaze
git-svn-id: svn://10.0.0.236/trunk@90261 18797224-902f-48f8-a5cc-f745e15eee43
2001-03-23 15:39:08 +00:00

57 lines
1.5 KiB
HTML

<html>
<head>
<title>Test Case: text in cell appears to left of left margin created by cellpadding</title>
<style>
.someClass { font-weight: bold; }
</style>
</head>
<body>
<p>this table is regular html and the cell has a class attribute:</p>
<table id="test" border="2" cellpadding="25">
<tr>
<td class="someClass">padding?</td>
</tr>
<tr>
</tr>
</table>
<p>this table is partly created by javascript code and the cell has a class attribute. this is where the text appears to the left of the left margin created by the cellpadding:</p>
<table id="test2" border="2" cellpadding="25">
<tr>
</tr>
</table>
<p>this table is partly created by javascript code and the cell has no class attribute. here the text obeys the cellpadding value, although there is another problem with this table that i'm filing under a separate bug report:</p>
<table id="test3" border="2" cellpadding="25">
<tr>
</tr>
</table>
<script type="text/javascript">
var table = document.getElementById('test2');
var row = table.insertRow(0);
var cell = row.insertCell(0);
cell.setAttribute('class', 'someClass');
cell.appendChild(document.createTextNode('padding?'));
table = document.getElementById('test3');
row = table.insertRow(0);
cell = row.insertCell(0);
// cell.setAttribute('class', 'someClass');
cell.appendChild(document.createTextNode('padding?'));
</script>
</body>
</html>