• Resolved laptolap

    (@laptolap)


    Hello,

    I want to remove the gap between the table and the text before.
    It seems to be one line and I dont know how to remove that.

    You can see this at: https://ricare.de/body-massagen/


    Ohrenkerzenbehandlung
    Indisches Entspannungsritual mit Nacken- und Kopfmassage.
    (Spacing!!!!)
    Verw?hnzeit: 30 Min. € 30,00
    3er Kur € 75,00

    How can I remove that gap/line by default for all tables?

    Thank you very much in advance.

    Best Regards
    Heiko

    https://www.ads-software.com/plugins/tablepress/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter laptolap

    (@laptolap)

    Something new, that I dont understand now.
    As you can see on the site mentioned above, only the first integrated table will make a Gap between the textline before.
    All other tables are placed exactly in the next line, as you can see.

    Really dont understand that.
    I made a new first table, copied by one that will not make a gap, but no difference.

    Hope for your support.

    Thread Starter laptolap

    (@laptolap)

    And once again something I recognized:

    When I add a line by pressing “return” in the visualmode of wordpress, than the according and following table will be displayed with a gap/line before.

    Example for the visual mode:

    Ohrenkerzenbehandlung
    Indisches Entspannungsritual mit Nacken- und Kopfmassage.
    [table id=29 /]
    Balance & Harmony
    Ausgleichende Rücken- und Nackenmassage.
    [table id=18 /]
    Feel & Relax
    Erleben Sie Entspannung bei einer Ganzk?rpermassage mit warmen Aroma?len.
    [table id=19 /]
    Candle-Light Massage
    Massage mit wertvollem ?l aus der Massagekerze.
    [table id=20 /]

    And with the following example there will be a gap between the text and the according table, and even NOT between the product content, like it should be:

    Ohrenkerzenbehandlung
    Indisches Entspannungsritual mit Nacken- und Kopfmassage.
    [table id=29 /]
    
    Balance & Harmony
    Ausgleichende Rücken- und Nackenmassage.
    [table id=18 /]
    
    Feel & Relax
    Erleben Sie Entspannung bei einer Ganzk?rpermassage mit warmen Aroma?len.
    [table id=19 /]
    
    Candle-Light Massage
    Massage mit wertvollem ?l aus der Massagekerze.
    [table id=20 /]
    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    For such spacing issues, I suggest to not work in the Visual Editor, as it can add invisible HTML code.
    Can you please check this in the Text editor, to see if that has maybe happened?

    Regards,
    Tobias

    Thread Starter laptolap

    (@laptolap)

    Hi Tobias,

    thanks for your reply.

    I just checked the text-mode yesterday, too. But there seems to be everything ok.

    Here is the code of the text-mode for the first three products:

    <h5 id="articleHeader">MASSAGEN</h5>
    ?
    
    Ohrenkerzenbehandlung
    Indisches Entspannungsritual mit Nacken- und Kopfmassage.
    [table id=29 /]
    Balance & Harmony
    Ausgleichende Rücken- und Nackenmassage.
    [table id=18 /]
    Feel & Relax
    Erleben Sie Entspannung bei einer Ganzk?rpermassage mit warmen Aroma?len.
    [table id=19 /]

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, that looks fine. It appears that the HTML structure that WordPress creates causes this. It is valid HTML, but it’s interpreted in an undesired way here.

    Can you maybe add line breaks after the Shortcodes?
    After that, we can try to reduce the spacing with CSS code.

    Regards,
    Tobias

    Thread Starter laptolap

    (@laptolap)

    You mean the < br > ? If so it is not working.

    <h5 id=”articleHeader”>MASSAGEN</h5>
    </br>
    Ohrenkerzenbehandlung
    Indisches Entspannungsritual mit Nacken- und Kopfmassage.
    [table id=29 /]

    Balance & Harmony
    Ausgleichende Rücken- und Nackenmassage.
    [table id=18 /]
    Feel & Relax
    Erleben Sie Entspannung bei einer Ganzk?rpermassage mit warmen Aroma?len.
    [table id=19 /]

    In this sample there is < br > between [table id=29 /] and “Balance & Harmony”

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    the <br /> should be fine. The problem is that WordPress (as it appears to me here when I view the HTML source of the page in the browser) adds a <p> tag before the first text. However, the browser (you can see this when investigating the DOM/HTML tree with the Developer Tools in the browser) adds a closing </p> before the table.
    And because of that, the <p> will then be shown before the table, including its bottom padding and margin, which results in that white space.

    Usually (all in the text editor), it’s sufficient to simply place the table Shortcode on its own line (you already have that), with an empty line before and after each one (you could try that maybe). You should not need extra HTML code here.

    We could then also play around with removing the bottom padding and margin from the <p> tags on this page, with “Custom CSS” like

    #post-15 p {
      padding-bottom: 0;
      margin-bottom: 0;
    }

    Regards,
    Tobias

    Thread Starter laptolap

    (@laptolap)

    Your Custom CSS code is working. Thank you very much, Tobias. ??
    And what is the code, that this will effect by default with all tables?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    this CSS does not modify tables, it actually modifies the paragraphs on the page. I would therefore not generally add this everywhere, but just on pages where you have this problem (in combination with a table). Otherwise, the spacing between regular paragraphs will be affected.

    Regards,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Spacing/Distance of the table after last textline of WP-Content’ is closed to new replies.