• Hi all-

    I’m about to step out on the ledge with this one…

    I use the extended version of TinyMCE which, like all WYSIWYG editors, has offered me little more than a convincing argument that I need to learn HTML and CSS so that I can chuck these profoundly useless broken toys in the trash once and for all.

    I have a simple two column – two row table that I have inserted using the editor. I’ve read dozens of posts and applied hundreds of lines of code that eventually came to benefit those who have had the same problem but alas I am sitting here dumbfounded staring at my left-aligned table.

    Also, I keep trying to take out the </table> piece from the 1st line of the code below as I think it’s only supposed to appear at the end of the table reference. When I remove it and update the page again, it reinserts itself back in the same place. Could this be the problem?

    Any help would be greatly appreciated.

    http://www.soldierfinancial.com/loan-programs

    <table align="center"></table><table class="aligncenter" border="0" cellspacing="10" cellpadding="10" align="center">
    <tbody>
    <tr>
    <td><a rel="attachment wp-att-1185" href="http://califund.com/loan-programs/attachment/house-for-sale/"><img class="aligncenter size-full wp-image-1185" title="house-for-sale" src="http://califund.com/wp-content/uploads/2011/05/house-for-sale.jpg" alt="" width="150" height="150" /></a></td>
    <td><a rel="attachment wp-att-1184" href="http://califund.com/loan-programs/attachment/refinance-2/"><img class="size-thumbnail wp-image-1184" title="refinance" src="http://califund.com/wp-content/uploads/2011/05/refinance-150x150.jpg" alt="" width="150" height="150" /></a></td>
    </tr>
    <tr>
    <td align="center">
    <h2><span style="color: #3366ff;">Purchase</span></h2>
    </td>
    <td align="center">
    <h2><span style="color: #3366ff;">Refinance</span></h2>
    </td>
    </tr>
    </tbody>
    </table>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Well to center images you’d do:
    margin-left:auto; margin-right: auto; display:block;

    So I suppose you add that for your table. 🙂

    Thread Starter topjaba

    (@topjaba)

    I’m pretty sure I’ve been down this road, but perhaps I did miss it. (all kaleidoscopic at this point).

    Would you happen to know exactly where that language needs to be inserted?

    Thanks

    Thread Starter topjaba

    (@topjaba)

    bump.

    I hate doing the bump thing but it’s getting cold out here on the ledge 🙂

    Still looking for a solution to center tables. Can anyone spot what might be wrong in the code above? It was generated by TinyMCE in the visual editor and the snippet as it is posted above hasn’t been touched so that I once I learn the proper fix, I can repeat it when need be.

    Thanks in advance to anyone willing to share.

    The code above is correct. Centers your table, images and text on a page. You must have css that is overriding it. I tried to go to the link above to see it but got a 404. You can check the page for which css effects which element using firebug if you use FF or developer tools if you use IE.

    For your class “aligncenter”, add that in the CSS. That I said above with the margins and display thing. Or you can add a “style” to your table.

    Like…
    table style="..."

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How on earth does one center tables?’ is closed to new replies.