Hello again.
I have been looking all over the internet on how to make a table using CSS.
This is what I have came up with so far, but it doesn’t work correctly.
ORIGINAL
<table width="70%">
<tr><td width="20%">ID:</td><td>{{id}}</td></tr>
<tr><td width="20%">Username:</td><td>{{username}}</td></tr>
<tr><td width="20%">Email:</td><td><input type="text" name="email" size="30" maxlength="100" value="{{email}}" /></td></tr>
<tr><td width="20%">Auth Level:</td><td><select name="authlevel"><option value="0" {{auth0select}}>User</option><option value="1" {{auth1select}}>Admin</option><option value="2" {{auth2select}}>Blocked</option></select></td></tr>
</table>
My best guess:
.container{
width:50%;
}
.cell1 {
width:15%;
}
.cell2 {
width:35%;
}
.cell1{
float:left;
background:#00ff00;
}
.cell2{
float:right;
background:#0000ff;
}
<div class="container">
<div class="cell1">ID:</div><div class="cell2">{{id}}</div>
<div class="cell1">Username:</div><div class="cell2">{{username}}</div>
<div class="cell1">Email:</div><div class="cell2"><input type="text" name="email" size="30" maxlength="100" value="{{email}}" /></div>
<div class="cell1">Auth Level:</div><div class="cell2"><select name="authlevel"><option value="0" {{auth0select}}>User</option><option value="1" {{auth1select}}>Admin</option><option value="2" {{auth2select}}>Blocked</option></select></div>
</div>
They just don’t align right and doesn’t look right.