Support » Fixing WordPress » Centering a table, adding rows

  • Hi,
    I am just finishing off a site for a restaurant ( and am having some issues with the wine list, which is built on a table, that I was hoping someone could help me with.

    The main issue is that no matter what I have tried, the table simply won’t remain centred in the page. I have added the <center></center> tags before and after the table, which at first works, but then disappears any time you go back to make any changes.

    I’ve also tried putting it inline with the table <table align=”center”>, which has never worked. I’ve gone through the style.css to see where anything might be floating or forced left, played around with it, still nothing? Any ideas?

    The other issue I’m having is in adding rows to the table. I am now quite comfortable adding the rows in myself but once the site is complete the client will want to be able to add and remove items from the list himself. Is there an easy way to do this with the wordpress ‘visual’ user interface without going into the code side of things, (which the client understandably, does not want to do!) ? I have looked into plugins and had a play with WP-Table Reloaded but found that it will also probably be a bit much for the client to deal with.

    Many thanks in advance 🙂

Viewing 1 replies (of 1 total)
  • esmi


    Forum Moderator

    If you gave that table a class, you could use something like:

    table.foobar {
    margin:0 auto;

    in the stylesheet to center it.

    As for updating the table, there isn’t an easy method that I’m aware of. If it was me, I’d probably try placing the table data in a comma-delimited text file (with a .php extension) that the client could either edit via the Appearance/Editor page or using a custom built theme options page. Then I’d parse the file and build the table dynamically on demand.

Viewing 1 replies (of 1 total)
  • The topic ‘Centering a table, adding rows’ is closed to new replies.