• Hi everyone,

    Pretty new to WordPress but it’s been a great help to building my own website. It looks and works realy sweet.

    But can someone tell me how to get a table into a post?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Just put the code into the post, in the HTML-mode.

    Thread Starter jw75

    (@jw75)

    That I tried, but then only the first row appears in the post after saving.
    Now I made a table like this:

    <table width=”100%” border=”0″>
    <tr align=”left”>
    <td style=”width: 60%”>headrow1 </td>
    <td align=”right” style=”width: 10%”> headrow2 </td>
    <td align=”right” style=”width: 10%”> headrow3 </td>
    <td align=”right” style=”width: 10%”> headrow4 </td>
    <td align=”center” style=”width: 10%”> headrow5 </td>
    </tr>
    </table>
    <table width=”100%” border=”0″>
    <tr align=”center”>
    <td align=”left” style=”width: 60%”>row1</td>
    <td style=”width: 10%”>row2</td>
    <td style=”width: 10%”>row3</td>
    <td style=”width: 10%”>row</td>
    <td style=”width: 10%”>row4</td>
    </tr>
    </table>

    As you can see I need to start every row with <table> again. Otherwise it won’t work!

    If I understand you correctly, you want the first row to contain the headings and the next row to contain some data, with the same column widths. If that’s so, I would take out the closing </table> and the starting <table> tags, making the next row start with <tr>. My code would be:

    =================================================
    <table width=”100%” border=”1″>
    <tr align=”left”>
    <td style=”width: 60%”>headrow1 </td>
    <td align=”right” style=”width: 10%”> headrow2 </td>
    <td align=”right” style=”width: 10%”> headrow3 </td>
    <td align=”right” style=”width: 10%”> headrow4 </td>
    <td align=”center” style=”width: 10%”> headrow5 </td>
    </tr>

    <tr align=”center”>
    <td align=”left” style=”width: 60%”>row1</td>
    <td style=”width: 10%”>row2</td>
    <td style=”width: 10%”>row3</td>
    <td style=”width: 10%”>row</td>
    <td style=”width: 10%”>row4</td>
    </tr>
    </table>
    ==================================================

    Also, to test, set border = “1” or something other than 0. That way the cell borders display. In production, set border back to 0 if you don’t want borders.

    Thread Starter jw75

    (@jw75)

    Thanks, I’ll try immediately!

    It’s the RTE (Rich Text Editor) that keeps eating the codelines. See this post: http://wordpress.org/support/topic/60902

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Table in Post’ is closed to new replies.