I would like my table to look like this.
ButwhenIaddthecontenttoit,itlookslikeI'mnotabletoleaveitasthetableabove.
functionlistarProdutos(){varconteudo="<table border='1'>";
conteudo+="<tr>";
conteudo+="<div class='indice'><p>Indice</p></div>"
conteudo+="<div class='nome'><p>Nome</p></div>"
conteudo+="</tr>";
//pos contator
for(var pos=1;pos<indice.length;pos++){
conteudo+="<tr>";
conteudo+="<td>"+indice[pos]+"</td>";
conteudo+="<td>"+nomes[pos]+"</td>";
conteudo+="</tr>";
}
conteudo+="</table>";
document.getElementById("txtrelatorio").innerHTML=conteudo;
}
.indice, .nome{
font-size: 15pt;
font-weight: 700px;
background-color: #000066;
}
tr,td{
font-size: 14pt;
background-color: #000066;
color: #CCCCCC;
}