• Resolved Roboc

    (@roboc)


    Great plugin but im having a small issue.

    I need to have a maximum height on the rows. I’ve tried

    .tablepress tr{
     max-height: 113px;
    }

    but when i have more than one image in the cell it makes the row really tall.

    here is a link to the page http://optcguide.com/25-2/. i want the table to look the same as the 5th table down in this page http://onepiece-cruise.blogspot.de/p/luffy.html. Notice how when the cell has more than one image in it the cell the images are shrunk down not placed on top of each other.

    If i can have this and keep it responsive ill be very happy.

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

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I’m afraid that setting a maximum row height like this is not possible in HTML tables. A row will always be at least as high as the content in it, due to how HTML tables work (yes, they are not really flexible 🙁 ).

    Now, in this case, one part of the problem is coming from the line breaks between the HTML code for the images. Those get transformed to HTML <br /> tags automatically and therefore should be removed (so that the HTML code in the cells is directly next to each other).

    But even then, you will need to reduce the width of the images in the last column with more specific CSS code, like

    .tablepress-id-1 .column-5 img {
      width: 50px;
    }

    Responsiveness will be a totally different issue though 🙁

    Regards,
    Tobias

    Thread Starter Roboc

    (@roboc)

    Thanks.

    One more issue which is simple but isn’t working sadly. I cant get the margins to show on the table. I want a gap on the left and right of the table. I have

    .tablepress {
    	margin-left: 50px;
    	margin-right: 50px;
    }

    but its not working

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    the problem here is that the content width of your theme does not have any padding. I would actually suggest some CSS like

    .entry-content {
      padding: 1.625em;
    }

    in your theme.

    Additionally, you should turn off the “Use DataTables” checkbox for this table, as you are not using the individual features anyways.

    Regards,
    Tobias

    Thread Starter Roboc

    (@roboc)

    Thankyou very much for the help

    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!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Row max height’ is closed to new replies.