I want my HTML table to look like this.
The content/phone no. should be in the middle of that table row and the edit icon should be at the right of the same row. I cannot figure out what would be the correct CSS to use. I have mentioned the HTNMl code with the CSS. Please let me know about the same.
Code
<style>
tr,
td,
th {
border: 1px solid black;
}
table {
border-collapse: separate;
border-spacing: 0;
min-width: 350px;
}
table tr th,
table tr td {
border-right: 1px solid rgb(0, 0, 0);
border-bottom: 1px solid rgb(0, 0, 0);
padding: 5px;
}
table tr th:first-child,
table tr td:first-child {
border-left: 1px solid rgb(0, 0, 0);
}
table tr th {
background: rgb(0, 0, 0);
border-top: 1px solid rgb(0, 0, 0);
text-align: left;
}
/* top-left border-radius */
table tr:first-child th:first-child {
border-top-left-radius: 20px;
}
/* top-right border-radius */
table tr:first-child th:last-child {
border-top-right-radius: 20px;
}
/* bottom-left border-radius */
table tr:last-child td:first-child {
border-bottom-left-radius: 20px;
}
/* bottom-right border-radius */
table tr:last-child td:last-child {
border-bottom-right-radius: 20px;
}
</style>
<div style="
margin-top: 2rem;
display: flex;
justify-content: center;
align-content: center;
padding-right: 15rem;
padding-left: 15rem;
margin-bottom: 3rem;
">
<table class="table table-striped table-hover" style="display: none" id="table">
<tbody>
<tr align="center">
<th class="col-sm-4 text-center" scope="row">ProfileUID :</th>
<td></td>
</tr>
<tr align="center">
<th class="col-sm-4 text-center" scope="row">First Name :</th>
<td></td>
</tr>
<tr align="center">
<th class="col-sm-4 text-center" scope="row">Email :</th>
<td></td>
</tr>
<tr align="center">
<th class="col-sm-4 text-center" scope="row">Profile Status :</th>
<td></td>
</tr>
<tr align="center">
<th class="col-sm-4 text-center" scope="row">Country Code :</th>
<td></td>
</tr>
<tr align="center">
<th class="col-sm-4 text-center" scope="row">Phone No. :</th>
<td>
<!-- <div class="input-group input-group-sm col-xs-4"><input class="form-control inputlg" type="text" placeholder="Enter Value" name="value" id="value" /></div> -->
<button type="button" id="edit" style="border-style: none; background-color:transparent; color:#001872; position:absolute; right:390px; top:461px" onclick="edit()"><i class="fa-solid fa-square-pen fa-2x"></i></button>
</td>
</tr>
<tr align="center">
<th class="col-sm-4 text-center" scope="row"> Last Generated OTP : </th>
<td></td>
</tr>
<tr align="center">
<th class="col-sm-4 text-center" scope="row">Employee ID :</th>
<td></td>
</tr>
<tr align="center">
<th class="col-sm-4 text-center" scope="row">User ID :</th>
<td></td>
</tr>
</tbody>
</table>
</div>