WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] Lists inside a cell adding breaks? (7 posts)

  1. Richtpt
    Member
    Posted 1 year ago #

    I've created an unordered list inside a cell. Very basic. Inside the cell I have typed:

    <ul>
       <li><a href="file.pdf">Download this</a></li>
     </ul>

    (there are other list items but they all look like this.)
    When I display the page I notice a big gap between each list item. Viewing the page source I notice there's a <br /> after each </li>. I didn't put it there and I can't figure out how to remove it. I don't want it, it's making my list look really ugly. How can I get ride of the break? Thanks! (and sorry, the page is password protected, I don't have another place to put it.)

    http://wordpress.org/extend/plugins/tablepress/

  2. Richtpt
    Member
    Posted 1 year ago #

    I just tried adding line-height: 0; to the CSS in the plugin options page and that seems to have worked. I'd still like to know why it's adding a break for me when I don't want it, but at least I have a work around.

  3. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your post, and sorry for the trouble.

    The reason for this is indeed in the code that you pasted into the cells: It contains line breaks, which are automatically transformed to HTML line break tags when the table is shown. This is what adds the white space. (For regular text, this is a good feature, as it allows you to use the "Enter" key in table cells. For HTML code like this, it causes the problem you are experiencing).

    To change this, you'll just have to remove all line breaks from the code, so that the entire button code would stand in one line of text (if you drag the table cell input field wide enough). Thus, only line breaks that happen automatically due to the width of the textareas are allowed.
    Does this make sense? So, in your case, just write the code as

    <ul><li><a href="file.pdf">Download this</a></li></ul>

    Regards,
    Tobias

  4. Richtpt
    Member
    Posted 1 year ago #

    Ah, gotcha. I wrote the html outside the plugin then imported the table. so I had it formatted so it looked nice. Maybe add a section in the FAQ about this - I have no problem with it, nice to know what is going on and how to fix it. THANKS!!!

  5. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    yes, I should add this to the FAQ, indeed! Good suggestion :-) Thanks!

    Best wishes,
    Tobias

    P.S.: In case you haven't, please rate TablePress here in the plugin directory. Thanks!

  6. Richtpt
    Member
    Posted 1 year ago #

    Done! :) I did say in my review one thing I would love is in the table editing it would be nice to be able to set the font and font size instead of using CSS, but that's super easy to do. I'm setting this site up for non-programmers to be able to administrate and maintain. Really like this plugin! Thanks again!

  7. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for the feedback, I really appreciate it!

    Yes, I agree that styling should be easier, but so far I haven't really found a solution that is easy to implement, suits all (or at least most) needs, and is flexible enough :-( So, for now I'll stick to "Custom CSS".

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic