• Resolved MagicTigger

    (@magictigger)


    Hi … again … 🙂

    same side:
    http://sterkrader-reiterhof.de/infos/hallenbelegungsplan/

    2nd row…

    i want to have that row height smaller, but nothing works. 🙁

    .tablepress-id-1 .row-2 {
    	height: 100px;
    }

    in the boxes are:

    <p style="text-align:right">&nbsp;&nbsp;K&nbsp;V
    A&nbsp;D&nbsp;L
    &nbsp;&nbsp;F&nbsp;P</p>

    and

    <p style="text-align:center">V&nbsp;E&nbsp;S
    L&nbsp;X&nbsp;I
    P&nbsp;B&nbsp;R</p>

    and

    <p style="text-align:left">S&nbsp;H
    I&nbsp;&nbsp;G&nbsp;C
    R&nbsp;M</p>

    as i need to format the text for display.

    sure I can do this by a picture and then might work, but why not with text?

    excessive claim?? 😀

    many thanks.

    https://ww.wp.xz.cn/plugins/tablepress/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Reducing the height of a row like this is only possible when the content in the cells allows it. That’s not the case in your example, as the <p> element that you are using there has some margin at the bottom. Also, the cells have big line height (both from the theme).
    To fix that, you could add this “Custom CSS”:

    .tablepress-id-1 .row-2 td {
    	line-height: 1;
    }
    .tablepress-id-1 .row-2 td p {
    	margin: 0;
    }

    An even better fix would be to not use those <div> and <p> wrappers in the cells, and instead just type in the text as

    K V
    A D L
    F P

    (for example), and then align them to the right with some CSS like

    .tablepress-id-1 .row-2 .column-2,
    .tablepress-id-1 .row-2 .column-5 {
      text-align: right;
    }

    Regards,
    Tobias

    Thread Starter MagicTigger

    (@magictigger)

    Hey, 🙂

    thanks again.

    I deleted the div’s and p’s.

    With first solution it works perfectly. 🙂

    Kind regards!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

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

    Sorry, but if i put this code,

    .tablepress-id-1 .column-2 {
    	text-align: right;
    	width: 350px;
    }

    Column 2 move to right-side page, but its aling right.
    But dont make width column.
    I want second column width more little and text-aling right.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    This is the page
    only with `.tablepress-id-1 .column-2 {
    width: 350px;
    }`

    Only with

    .tablepress-id-1 .column-2 {
    	width: 350px;
    }

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the link. Unfortunately, I’m only seeing a “coming soon” page 🙁

    Regards,
    Tobias

    Sorry, the page is on now

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for that!

    Instead of setting the width for the second column, you will want to set the width for the entire table and align the second column to the right, e.g. with this:

    .tablepress-id-1 {
      width: 350px;
    }
    .tablepress-id-1 .column-2 {
      text-align: right;
    }

    Regards,
    Tobias

    Perfect
    Thanks you 😉

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

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

    Using this code, how can you make it so that the height changes for all rows in your table?

    .tablepress-id-1 .row-2 td {
    line-height: 1;
    }
    .tablepress-id-1 .row-2 td p {
    margin: 0;
    }

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Stacey,

    you would have to remove the .row-2 part from the code.
    However, this is most likely not the correct code for your problem in the other thread. I don’t recommend that you use this, and I will suggest another approach in the thread that you opened.

    Regards,
    Tobias

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘column height / formatted text’ is closed to new replies.