I am creating an Index page in an MVC 1.0 application and want to right-align the text in one of the columns. I have tried to do this by creating an extra class in the td style and setting the "text-align: right" in this but this doesn't appear to be being applied to that element.
In my CSS file I have:
table td
{
padding: 5px;
border: solid 1px #e8eef4;
}
table td.numeric
{
text-align: right;
}
In my view I have:
<table>
<tr>
<th>Location</th>
<th>Duration</th>
</tr>
<% foreach (var item in Model) { %>
<tr>
<td><%= Html.Encode(item.Location.Description) %></td>
<td class="numeric"><%= Html.Encode(itemDuration) %> min</td>
</tr>
<% } %>
</table>
Why wouldn't the text-align style be being used?