How do I align text in "top right"?
51,958
<table>
<tr>
<td align="right" style="vertical-align: top;">
<b>Car Name:</b>
</td>
<td>
<div><%=Model.DataMayLoad1%></div>
<div><%=Model.DataMayLoad2%></div>
<div><%=Model.DataMayLoad3%></div>
<div><%=Model.DataMayLoad4%></div>
</td>
</tr>
</table>
Related videos on Youtube
Author by
MrM
Updated on July 09, 2022Comments
-
MrM almost 2 years
I have the following table.
<table> <tr> <td align="right"> <b>Car Name:</b> </td> <td> <div><%=Model.DataMayLoad1%></div> <div><%=Model.DataMayLoad2%></div> <div><%=Model.DataMayLoad3%></div> <div><%=Model.DataMayLoad4%></div> </td> </tr> </table>
The "Car Name:" column is right aligned, but in the center. Is there a way to align that column to the top right corner?
-
Darin Dimitrov almost 13 yearsJust a side note concerning the XSS vulnerability that your site is exposed to by using
<%= Model.SomePropertyName %>
. So while you worry about aligning columns you have far bigger problems with your code. -
Dismissile almost 13 yearsIf you use <%: %> it will HtmlEncode the content. So you probably want to use that in its place.
-
MrM almost 13 yearsTHanks for the help. Would <%: %> help in the cross site scripting vulnerability?
-
-
Chris Cudmore almost 13 yearsdeprecated.. Use PaulPRO's solution