-1
How do I replicate the div class Row-tablet with js? I have an array with users and I know the amount, but I don’t know how to replicate all the div and everything inside it.
.row-table-head, .div-table, .row-table{
display: grid;
grid-template-columns: 50px 180px 70px;
width: 300px;
margin: auto;
}
.row-table-head{
display: block;
}
.row-table a{
text-decoration: none;
color: #000;
}
.div-table:hover{
background-color: #a0a0a0;
}
.row-table-head .col-table{
padding: 6px 8px;
border: 1px solid #ccc;
}
.row-table .col-table{
padding: 0px 6px;
}
<body align="center" onload="setup()">
<h1>IMPEXPROS</h1>
<div class="table">
<div class="row-table-head">
<div style="background-color:black; color:white; font-weight:bold" class="col-table">LISTA TODOS USUARIOS</div>
</div>
<div class="row-table">
<div class="div-table">
<a href="" class="col-table">
<div>9999</div>
</a>
<a href="" class="col-table">
<div>vitorpereira</div>
</a>
<div class="col-table">
<input type="button" id="excluirUsuario" value="Excluir">
</div>
</div>
</div>
</div>
</body>
I think you can remove this css code from the question so as not to confuse people who can help you since the question has no relation to it. Now about the question have you tried anything? Post the code as far as you have so far.
– Victor Laio
Where do you want to replicate it? One below the other?
– Taffarel Xavier
Victor, I put the css to the person understands that it’s like a table, I haven’t tried anything because I don’t know which function that replicates.
– Vitor Pereira
Taffarel, that’s right, will create each row of the table according to the amount of users q have in the array.
– Vitor Pereira
You want to replicate the entire div or its contents?
– Ewerton Belo
I will replicate the entire div, pq created a table with Divs, the data I will add while replaying the row.
– Vitor Pereira