I'm using JotForm
and I have to style some table with only CSS
. My problem is how can i integrate two rows, first row is header and second row is input section. But I can't explain what my problem is. Just see the code and try to solve my problem please.
HTML:
<table>
<tr>
<th>Company Name</th>
<th>Company Name</th>
<th>Company Name</th>
<th>Company Name</th>
<th>Company Name</th>
</tr>
<tr>
<td><input type="text" name="" placeholder="Write here"></td>
<td><input type="text" name="" placeholder="Write here"></td>
<td><input type="text" name="" placeholder="Write here"></td>
<td><input type="text" name="" placeholder="Write here"></td>
<td><input type="text" name="" placeholder="Write here"></td>
</tr>
</table>
CSS:
tr {
display: table;
width: 800px;
}
td {
display: inline-table;
width: 25%;
}
th {
display: inline-table;
width: 25%;
background-color: red;
color: #fff;
font-weight: 500;
}
Result of code
I want it to be like
Is there way to solve this with only css?