Question in HTML table

When you create the basic HTML table, everything seems to remain in the center of the table. I do not want this, how can I stop this?

I want to use a table with two html columns for a column for a sidebar for content. Because I have so much content, the text of the sidebar (which is a bit) state to the middle of the column.

How to align text to stay in the upper left corner of columns?

+3
source share
5 answers

In the element <td>that contains the lefthand sidebar, try specifying a style that aligns the text at the top:

<td style="vertical-align: top">(Sidebar HTML code here)</td>

+1
source

You can control the alignment of columns directly in your markup using:

<td style="text-align: left; vertical-align: top;"></td>

or even just

<td align="left"></td>

, Piccolomomo , . , : http://www.w3schools.com/html/html_tables.asp

+1

You can use CSS to change the alignment of text inside your table:

td {
    text-align: left;
    vertical-align: top;
}
0
source

To align text in a table you need to use css.Without css or any stylesheet, you cannot align them. For this you can use the built-in css or external css.

<style type="text/css">
table td{
text-align:left;
vertical-align:top;
}
</style>
0
source
<table>
     <tr valign="top">
        <td align="left">
           Side Bar
        </td>
        <td>
           Content
        </td>
     </tr>
</table>
0
source

All Articles