Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I align text in "top right"?

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?

like image 658
MrM Avatar asked Jul 25 '11 14:07

MrM


People also ask

How do I align text to the right in word?

Select the text that you want to align. On the Home tab, in the Paragraph group, click Align Left or Align Right .

How to align text in HTML using CSS?

A Text Alignment can be Center, Right, Top, Bottom, Justify, or Vertical Horizontal. For HTML Text Alignment have to use a CSS style. This tutorial we will learn how to Align text and example on <p> and <div> tag in HTML. Use a style attribute in any tag to give alignment to it. See below HTML Text Alignment Code using an inline CSS.

What is vertical alignment in word?

Vertical alignment determines the position of the text within a section of a document relative to the top and bottom margins, and is often used to create a cover page. Align the text left or right Center the text horizontally between the side margins Center the text vertically between the top and bottom margins

What are the default text alignment settings?

The following example shows center aligned, and left and right aligned text (left alignment is default if text direction is left-to-right, and right alignment is default if text direction is right-to-left):


1 Answers

<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>
like image 154
Paul Avatar answered Oct 13 '22 06:10

Paul