I have created a html table with 2 columns. I want the first column containing text to be right aligned, but i want the second column to stay left aligned as it contains check boxes. For presentation it would look, but ive no idea. I have tried creating a td class="column1" then text-align: right; in the CSS but no luck.
Any ideas would be greatly appreciated.
HTML
<td class="column1">Retrieve Logs:</td>
<td class="column2"><input type=checkbox name="getcamlogs" checked="checked"></td>
CSS
td.column1 {
text-align: right;
}
Here you go, this should work :)
<style>
#mytable {width:500px; margin:0 auto;}
#mytable td {width:250px;}
#mytable .left {text-align:right; background:#333;}
#mytable .right {text-align:left; background:#666;}
</style>
<table id="mytable">
<tr>
<td class="left">1</td>
<td class="right">2</td>
</tr>
</table>