Hi guys. I’m puzzled by this one. I’m creating a table using the DOM. Border is set to 0 but it looks “broken up” on IE or as if it had a border (looks fine on FF and Netscape).
You can view the table here: [url]http://home.earthlink.net/~andre.munoz/tmp6.html
This is a stripped down version of the actual project I’m working on but it’s the part I’m having issues with.
I can’t seem to figure out why it looks like that in IE. I’d appreciate it any input you can offer.
I’ll post the source code here also, just in case…
[CODE]<html>
<head>
<title>test</title>
<script language=”javaScript”>
<!–
var font_family = “Arial”;
var font_size = 13;
var heading_font_size = 14;
var heading_color = “white”;
function createTable()
{
if( document.getElementById && document.createElement )
{
// Declare variables and create the header and body of the table.
var tableContainer = document.getElementById(“oTableContainer”);
var oTable = document.createElement(“table”);
var oTHead = document.createElement(“thead”);
var oTBody = document.createElement(“tbody”);
var oRow, oCell, oText, oBR;
var i, j;
oTable.setAttribute(“id”,”bidsTable”);
oTable.setAttribute(“border”,”0″);
oTable.setAttribute(“cellspacing”,”0″);
oTable.setAttribute(“cellpadding”,”2″);
oTable.setAttribute(“width”,”580″);
oTable.appendChild(oTHead);
oTable.appendChild(oTBody);
oTHead.id = “bidsTableHead”;
oTBody.id = “bidsTableBody”;
// Insert a row into the header.
oRow = document.createElement(“tr”);
oRow.bgColor = “lightskyblue”;
oRow.noWrap = true;
oTHead.appendChild(oRow);
// customer
oCell = document.createElement(“td”);
oText = document.createTextNode(‘CUST’);
oCell.appendChild( oText );
oRow.appendChild(oCell);
// username
oCell = document.createElement(“td”);
oText = document.createTextNode(‘USERNAME’);
oCell.appendChild( oText );
oRow.appendChild(oCell);
// comment
oCell = document.createElement(“td”);
oText = document.createTextNode(‘CMT’);
oCell.appendChild( oText );
oRow.appendChild(oCell);
// time
oCell = document.createElement(“td”);
oText = document.createTextNode(‘TIME’);
oCell.appendChild( oText );
oRow.appendChild(oCell);
// Insert the table into the document tree.
tableContainer.appendChild(oTable);
}
}
//–>
</script>
</head>
<body onLoad=”javascript:createTable();”>
<!– Placeholder for the table //–>
<div id=”oTableContainer”></div>
</body>
</html>