• Resolved 7746T

    (@7746t)


    Hi Tobias:

    Hoping you can help with a CSS suggestion.

    When I use <ul><li> within a table cell, the line spacing appears appears to be almost double. I’ve tried a few variations on the below based on tips in the forum as well as the FAQ w/o success.

    .tablepress-id-10 tbody li {
    line-height: normal;
    }

    .tablepress ul li::before {
    display: none !important;
    line-height: normal;
    }

    Can you point me in the right direction? Thanks and regards –

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Most likely, this is caused by line breaks that you have in the HTML code. These get transformed to HTML <br /> tags which add vertical spacing.
    To prevent that, please change the Shortcode that you are using to

    [table id=123 convert_line_breaks=false /]
    

    Regards,
    Tobias

    Thread Starter 7746T

    (@7746t)

    Thank you for the prompt response!

    The above works and I see what’s happening … before applying the revised Shortcode I tried removing the line breaks in one cell (ie it was one long string) and the extra spacing disappeared.

    I then applied the revised Shortcode and it impacted the entire table. Since this is a “mixed use” table (some cells with HTML, some without) I’ll need to hardcode the <br /> on certain lines where I need it.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, in mixed tables, you’d then have to add the <br /> tags in the desired places.

    Another idea might be to hide the <br /> tags that are inside <ul> tags via CSS:

    .tablepress ul br {
      display: none;
    }

    Regards,
    Tobias

    Thread Starter 7746T

    (@7746t)

    Hiding the <br /> tags inside <ul> using the above CSS is the perfect compromise. Works as designed. Thanks (and coffee sent ??

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!
    And thanks for the donation, I really appreciate it!

    Best wishes,
    Tobias

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bullet Point (unordered list) Line Spacing’ is closed to new replies.