WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] Formatting of multiple lines in a table cell (8 posts)

  1. kwbridge
    Member
    Posted 2 years ago #

    Hi,

    In one of the cells of my table is a short paragraph of text. A
    tag is being added to the end of each line - I am not adding that in. It seems that this is happening to keep the text from being all one line and making the table cell to wide. Is there anyway to get around this or keep it from happening?

    The example is here.

    http://184.172.184.95/~jamesgre/jga-team/jga-staff/

    Thanks

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    this happens because in that textfield for that cell, there are manual line breaks. Those get transformed to the HTML <br> tag that you see. All you need to do is remove those line breaks. While in the textfield you should only have automatic line breaks that are added by the browser due to the width of the text input field.

    Regards,
    Tobias

  3. kwbridge
    Member
    Posted 2 years ago #

    Thanks for the quick response.

    When I remove the breaks or type in the content manually rather than pasting it in, the text stays all one one line and the width of the table cell is too wide. I tried setting widths for the cells to deal with this issue but am still having the same problem.

  4. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    I found something else: As it seems, the table is wrapped in a <pre> HTML tag, which basically influences the styling a lot, as this is intended for other purposes.
    Probably, this <pre> is wrapped around the table Shortcode already, from copy/pasting.
    Please go to the "Edit" screen of the page (where you entered the Shortcode), and switch from "Visual" to "HTML" editing (in the upper right-hand corner of the editor textfield) there.
    You now probably see something like this:

    <pre><span style="font-family: verdana, geneva; font-size: medium;">[table id=4 /]</span></pre>

    Please remove the surrounding HTML tags, so that this line only is the Shortcode

    [table id=4 /]

    After that, the table should be visible as a table again (with all columns), and some word wrapping. We can then continue with changing the column widths.

    Regards,
    Tobias

  5. kwbridge
    Member
    Posted 2 years ago #

    Thanks! I removed that code and the table cell looks a little better. Should I set widths for the cells?

  6. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    awesome! Very nice!
    Now I suggest to simply reduce the width of the table, with

    .wp-table-reloaded-id-4 {
      width: 60%!important;
    }

    Just paste that into the "Custom CSS" textarea on the "Plugin Options" screen of WP-Table Reloaded.

    Best wishes,
    Tobias

  7. kwbridge
    Member
    Posted 2 years ago #

    Thanks so much - that did it. Well, I changed it to 80% but it's all good now. I really appreciate your help.

  8. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    Great that this worked so easily!
    Yes, 80% looks good, too :-)

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic