I am looking to create a table
with a left floated cell, a right floated cell, and the middle cell to remain centered.
For example: https://i.sstatic.net/xXo59.png
Issue: As the content within the middle cell increases, it shifts further to the left, reducing the margin I want between the cells.
Example: https://i.sstatic.net/ElcOT.png
Code:
.settings {
/*background: #636969;*/
width: 750px;
margin: 0 auto;
padding: 1em;
}
.settings h4 {
padding: 1em 0;
letter-spacing: 1px;
border-bottom: 1px solid #cacece;
}
.settings table {
width: 100%;
font-size: 0.9em;
letter-spacing: 1px;
font-weight: 200;
}
.settings tr {
border-bottom: 1px solid #cacece;
}
.settings td {
padding: 0.5em 0;
}
.settings .edit {
text-align: right;
}
<!-- start settings -->
<div class='settings'>
<h4>Account Settings</h4>
<table class='options'>
<tr>
<td class='name username'>Name</td>
<td class='value'>Robert Rocha</td>
<td class='edit'><a href='#'>Edit</a>
</td>
</tr>
<tr>
<td class='name email'>Email</td>
<td class='value'><a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="087d66617c6d6c7b7c697c">[email protected]</a></td>
<td class='edit'><a href='#'>Edit</a>
</td>
</tr>
<tr>
<td class='name pword' colspan='2'>Password</td>
<td class='edit'><a href='#'>Edit</a>
</td>
</tr>
</table>
</div>
<!-- end settings -->