WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] Image Size (12 posts)

  1. Granit
    Member
    Posted 1 year ago #

    I do not know if this question have been up before but i am trying to add images to a table but the images are resized and way to small when i publish the table.

    Are there any way to get the right size of the image?

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    that image size is usually determined by the size that you select when inserting the image from the WordPress Media Library (you can select Thumbnail, Medium, Large, and Full Size there). Did you select the desired size there?

    If that's not working, it's possible that your theme is overriding the size settings for images in tables.
    In that case, please post a link to the page with your details, and describe how what you see differs from what you'd like to have. I will then gladly try to find a solution.

    Thanks!
    Tobias

  3. Granit
    Member
    Posted 1 year ago #

    Hi and thank you for the quick replay.

    I have picked the right size in Media Library so thats not the case.
    Here is the page, http://www.bettools.se/livebetting/ under Bolag the images are way to small. The should be 73x14.

    The content area is small but i have even tried with a width that are bigger with the same result.

    Thank you.

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for the link! This is indeed caused by your theme.
    To change this, please add this CSS code to the "Custom CSS" textarea on the "Plugin Options" screen of TablePress:

    .tablepress img {
        max-width: none;
    }

    Note that the first image is still bigger. That's because you have set the width to 100 in the HTML code for the image.

    Regards,
    Tobias

  5. Granit
    Member
    Posted 1 year ago #

    Thank you that worked great.

    Yes i did change the size of the first image to try if anything happend.

    Is there any code that can be inserted in the custom css so that the images are ending up per automatic in the middle and not like now in the top?

    Thank you.

  6. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    great that this worked!

    To center an image in the cell, please try

    .tablepress-id-1 .column-1 {
        vertical-align: middle;
    }

    That will vertically center everything in the first column of the table with the ID 1.

    Regards,
    Tobias

  7. Granit
    Member
    Posted 1 year ago #

    Worked great, thank you.

    One question for another table that looks the same as the one you looked at, but this also have little icons in the second row, how to get those in center with css?

    Take a look here if you want.

    http://bettools.se/mobilguiden/

    Regards,
    Niklas

  8. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    that's a little bit more tricky. When inserting the images, you chose to not align them, so that they get a CSS class that your theme uses to apply some margin to them.

    This new "Custom CSS" (instead of what you have now) should fix everything (and optimize a few things):

    .tablepress img {
        max-width: none;
    }
    
    .tablepress-id-1 .column-1 {
        vertical-align: middle;
    }
    
    .tablepress-id-4 .column-1,
    .tablepress-id-4 .column-2 {
        vertical-align: middle;
    }
    .tablepress-id-4 img {
        vertical-align: middle;
        margin: 0;
    }

    Regards,
    Tobias

  9. Granit
    Member
    Posted 1 year ago #

    I cant say anything other then it is lovely now.
    Thank you very much for a super support and a wonderful plugin.

    Best regards,
    Niklas

  10. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Niklas,

    no problem, you are very welcome!
    Great to hear that everything is working now :-)

    Best wishes,
    Tobias

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

  11. Daerias
    Member
    Posted 7 months ago #

    http://dertechniker.eu/wordpress/vereine-in-deutschland/

    my images on column 2 are circumcised

    the CSS codes above didn't solved my problem

    could you help me please?

    my CSS:
    -----------------------
    .dataTables_wrapper {
    width: 960px;
    }

  12. TobiasBg
    Member
    Plugin Author

    Posted 7 months ago #

    Hi,

    thanks for your post, and sorry for the trouble.

    The problem is that you have included the thumbnail version of some images, and that's why they are cut off. You will need to add the full version of the images.

    Then, please also change your "Custom CSS" to

    .dataTables_wrapper {
      width: 960px;
    }
    .tablepress-id-1 {
      width:100%;
    }
    .tablepress-id-1 .column-2 img {
      width:150px;
    }

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.