WordPress.org

Support

Support » Themes and Templates » I can't center tables in wordpress!

I can't center tables in wordpress!

  • Hi i am having trouble centering tables in WordPress. When i put this

    <table border=”1″ align=”center”>

    the table is centered in the editor, but when i publish it the table is still in the left!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    @esmi

    Forum Moderator

    Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of assistance.

    use <p> </p>
    Example:
    <p align=center>table /table </p>

    There is likely a CSS Style set in your theme or plugin called ‘table’ (that justifies the location of all tables that do not have another CSS style called). Create a new style and call that one:

    Change to:

    <table class="tablemine" /*....the rest......*/

    Add to theme or plugin CSS:

    .tablemine {
         align:center;
    /*.....more (copy from existing table style if needed)....*/
    }

    Often times theme and plugin writers create CSS with a name that may be called in any part of your site which can cause issues. If no class is created called ‘table’ the defaults for the table attribute are used.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I can't center tables in wordpress!’ is closed to new replies.