mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-14 03:30:17 +01:00
57 lines
1.5 KiB
HTML
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>
|