WordPress inserting spaces above table

  • Unknown's avatar

    Hello all,

    I have created a page with some text and a table. The table is appearing ten lines below the text, although I have placed only one line between them. I have simplified the table coding as much as possible, but can’t prevent these extra lines from appearing. Please help? I would like the table to appear just below the text.

    http://vastadiem.wordpress.com/table-test/

    Thanks,
    -Johnny

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Here’s the table code I’m using (hope the forum doesn’t try to render this code!):

    <table border=”3″ cellspacing=”3″ cellpadding=”3″>
    <tbody>
    <TR>
    <TD COLSPAN=”6″ ALIGN=”center”><I>Calendar heading</I></TD>
    </TR>

    <tr>
    <td align=”center”>Mon</td>
    <td align=”center”>Tue</td>
    <td align=”center”>Wed</td>
    <td align=”center”>Thu</td>
    <td align=”center”>Fri</td>
    <td align=”center”>Wknd</td>
    </tr>

    <TR>
    <TD ALIGN=”center” width=”67″><B>28</B>
    Performed</TD>
    <TD ALIGN=”center” width=”67″><B>29</B>
    Performed</TD>
    <TD ALIGN=”center” width=”67″><B>30</B>
    TBD</TD>
    <TD ALIGN=”center” width=”67″><B>1</B>
    TBD</TD>
    <TD ALIGN=”center” width=”67″><B>2</B>
    TBD</TD>
    <TD ALIGN=”center” width=”67″><B>3</B>
    TBD</TD>
    </TR>
    </tbody></table>

  • Unknown's avatar

    Delete this from the very end of the page:
    </div>

    To prevent this from happening again, go to Settings>Writing and tick the option “WordPress should correct invalidly nested XHTML automatically”.

    PS The forum usually does render code: you must paste it between backticks.

  • Unknown's avatar

    Thanks! There was no `</div> for me to erase in my code, but I did tick the option that you mentioned, and re-saved the page, and now it’s working.

    Thanks again,
    -Johnny

  • Unknown's avatar

    You’re welcome. (In order to reply I had to check the source code of your page: maybe I mistook a good div tag for an orphan, but since the problem was bad html anyway, the treatment you applied took care of the real culprit!)

  • The topic ‘WordPress inserting spaces above table’ is closed to new replies.