line breaks in

  • Author
    Posts
  • #688830

    rogerhillnm
    Member

    What is the accepted html coding to enforce a line break within a table? The WordPress editor doesn’t like
    either within a <tr> or <td> tag.
    Thanks.

    The blog I need help with is newdarshan.wordpress.com.

    #688909

    The standard break code is this (note the space between the “r” and the “/”):

    <br />

    #688910

    rogerhillnm
    Member

    That’s:
    WordPress editor doesn’t like `
    ‘ br/
    either within a <tr> or <td> tag.

    #688912

    rogerhillnm
    Member

    Thanks for the reply. But I can’t get either
    or < br />
    to work.

    #688913

    timethief
    Member

    I just put Spectrum up on my test blog and tried to place and HTML table in a post. The coding was stripped out. I suggest you contact Staff. After you use the searchbox, under the search results, at the bottom of the page there will be a section that says “Have you found the answer to your question?” You can choose either “Yes I found the answer to my question.” or “No I didn’t find the answer to my question and I would like to contact support for help.” The no option will reveal the contact form.

    This is the code I used:

    <table border="1">
    <tr>
    <td>row 1, cell 1</td>
    <td>row 1, cell 2</td>
    </tr>
    <tr>
    <td>row 2, cell 1</td>
    <td>row 2, cell 2</td>
    </tr>
    </table>

    #688914

    <tr> is a “row” designation. <td> is a cell designation. You cannot put text into a <tr>

    Also I gave the syntax since the majority of people are still trying to use the old obsolete break tag which no longer works.

    Give this a try.

    <p>This is the part of the text before the break<br />this is the text after the break.</p>

    #688915

    Also, wordpress will hide the break tags in the HTML editor. I just did breaks inside cells in my test blog and they worked fine.

    http://flippintestblog.wordpress.com/2011/08/24/table-test-with-line-breaks-in-cells/

    #688917

    This was the very simple table I did. Once the post saves, the break tags will be hidden, but if you preview the results will still be there.

    <table>
    <tbody>
    <tr>
    <td>this is some text<br />
    after a break</td>
    <td>this is some text<br />
    after a break</td>
    <td>this is some text<br />
    after a break</td>
    </tr>
    </tbody>
    </table>
    #688992

    rogerhillnm
    Member

    Thank you both for your help.
    As you have noted the ‘
    ‘ are stripped out by the editor, but, unlike your experience, after updating the post the line breaks just weren’t there. ?? Sacredpath, have you tried the simple table with the ‘
    ‘ at the end of the ‘<td>’, as it is in my case?
    I find that hitting Enter while in the Visual editor at the end of a stanza will produce white space upon updating. But returning to the Editor for changes, strips out the white space and all the “Enters” have to be redone in the new edit.
    I wonder what the WordPress editor has against ‘< br />’ ?
    If you concur, sacredpath, I will contact Staff about this.

    #688993

    rogerhillnm
    Member

    Even this editor doesn’t like br.
    –simple table with ‘< br />’ at the end of–

    #688996

    br’s or empty paragraphs at the end of a block of text will be stripped out. What you can do in most cases is use a non-breaking space after the break tag at the end like this.

    <br />&nbsp;

    #688997

    OK, the above gets stripped out.

    #689102

    annell4
    Member

    I am a techno peasant… I can’t seem to get the line breaks. I read, I try shift/return, post and no luck?

    #689103

    timethief
    Member

    You will get double spacing between paragraphs in every theme here of which I’m aware. Hold shift and press enter which will put in a standard break (no blank line). In graphic design/page layout, it is called a soft return.

    1. To get standard line spacing on paragraphs (blank line between paragraphs) select all the text in the post, click on the “format” pulldown at the left end of the lower row of icons and select paragraph.

    2. If you want a standard paragraph break, at the end of a paragraph, press return/enter.

    3. If you want no blank line, hold down shift and then press return/enter.

    Space between lines. > http://wpbtips.wordpress.com/category/space-betweeen-lines/
    Space between paragraphs > http://wpbtips.wordpress.com/category/space-between-paragraphs/
    Formatting poetry http://en.support.wordpress.com/writing-and-formatting-poetry/

    #689104

    rogerhillnm
    Member

    If you’re in a table environment, I find that an Enter (not shift+enter) puts in a linebreak that persists through a post. It will, however, be stripped out upon a re-edit of that post. Staff says this is because the WP editor has only limited support for the table environment and they have no suggested workaround. I think it’s a bug that needs fixing (IMHO).

    #689105

    timethief
    Member

    @rogerhillnm

    I think it’s a bug that needs fixing (IMHO).

    Thanks for sharing that and I do agree with you.

The topic ‘line breaks in’ is closed to new replies.