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
Hey, 🙂
thanks again.
I deleted the div’s and p’s.
With first solution it works perfectly. 🙂
Kind regards!
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.
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;
}
Hi,
thanks for the link. Unfortunately, I’m only seeing a “coming soon” page 🙁
Regards,
Tobias
Sorry, the page is on now
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
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;
}
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