Centering a table?

  • Author
    Posts
  • #259881

    johnrowley
    Member

    Hi guys,

    I’m new here and previously to center to images side by side I would use a table like this,

    <center><table>
    <tr>
    <td></td>
    <td></td>
    </tr>
    </table></center>

    However, this doesn’t seem to work on WordPress.com. Is there a way around it?

    Thanks

    #260090

    wpvstp
    Member

    To center the whole table within the post:
    <table align="center"><tr><td></td>/tr></table>
    To center the cell contents:
    <td align="center"></td>

    #260092

    1tess
    Moderator Emeritus

    Serendipity! That’s exactly what I wanted to know!
    Thank you.

    #260097

    1tess
    Moderator Emeritus

    Oh, well. It doesn’t seem to work. Likely I’m still doing something wrong.

    #260099

    @1tess: Perhaps you didn’t apply wpvstp’s suggestion correctly. Let me try to clarify: instead of
    <table>
    in the beginning, you put
    <table align="center">

    #260103

    1tess
    Moderator Emeritus

    html always makes me stupid. I was making it too complicated: it works perfectly.
    I’m making a table with data in the cells and only now read the original post. It’s easier in WP to center 2 or more pictures without using a table:
    Insert pictures into the post with “align none” for each one. Once they are visible in the editor, select both pictures (highlight), then use the column alignment tool in the visual editor to center them. You may want to add space between the pictures by going back to “Advanced Settings” to add horizontal space between them.

    #260147

    1tess
    Moderator Emeritus

    panaghiotisadam,

    Thank you. I got it!
    I got so inspired with the success that I even figured out how to add colors!

    #260148

    wpvstp
    Member

    You can add pretty much all table code as shown in the examples here
    http://www.w3schools.com/html/html_tables.asp
    But beware, if the table get’s too sophisticated and you miss a tag here or there it can mess up the whole thing.

The topic ‘Centering a table?’ is closed to new replies.