• Resolved luanafaria

    (@luanafaria)


    Hi!

    I’m using the plugin Image Gallery Reloaded to my gallery and inserting into a table of Tablepress to get center it using the code in the Custom CSS:

    .tablepress-id-1 {
    width: auto;
    margin: 0 auto 1em;
    }

    I installed Responsive Tables of Tablepress. Adding the [table id = 1 responsive = “all” /] in my Gallery page, the table no longer be centered and nothing changed when opening my site on tablets or mobiles.

    I tried to change the code to:

    .tablepress-id-1 tr,
    .tablepress-id-1 td {
    width: 100%;
    margin: 0 auto 1em;
    }

    But nothing happened.

    My website: http://luanafaria.com

    What could I do to center the table and make it responsive so it can be displayed correctly on all platforms?

    Thank you!

    https://wordpress.org/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Using

    [table id=1 responsive="all" /]

    is actually not really a good idea, as it would mean that the responsive mode is active on all screen sizes (i.e. the table is already flipped). You should use a parameter value like tablet or phone, as mentioned on the Extension’s web page.
    Also, in the responsive mode, it does not really make sense to center the table, and your CSS code would also do more harm here, as it would apply to table rows and cells.

    Now, unfortunately, I can’t really suggest what to change here, as I could not find a table on the website from the link that you posted 🙁 Can you please guide me?

    Regards,
    Tobias

    Thread Starter luanafaria

    (@luanafaria)

    Hi, Tobias!

    Thanks for the answer.

    This is the table that I’m not able to fit into tablets and mobile. Images are cut:

    http://luanafaria.com/galeria/

    I’ve changed the responsive = “all” to responsive = “tablet” “phone”, but it didn’t work too.

    Do you think that it could be some configuration with the gallery?

    Regards,
    Luana

    Thread Starter luanafaria

    (@luanafaria)

    I tried to remove the Custom CSS code to see if it worked, but nothing changed. I believe it is not what is causing the problem.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the link! Now, I’m a little bit confused here.
    That table has only one cell, which contains a gallery, right? This is not really a good use of tables (i.e. using a table doesn’t really make sense), and making that “table” responsive won’t work. After all, it would still have to be display as a table.

    Can you therefore maybe explain why you are using a one-cell table here? I think that it would be better to just directly embed the gallery and then try to make that responsive.

    Regards,
    Tobias

    Thread Starter luanafaria

    (@luanafaria)

    Hi, Tobias!

    That was the only solution I found to center the gallery. 🙁
    Reading on some forums, someone had mentioned this option, but in fact does not make sense to insert it into a table, but try to configure it so that it is centered.

    Anyway, thanks for the help!

    Regards,
    Luana

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    ah, ok, I see. No, this is not a good idea, here.

    Instead, you could try to simply add this CSS to your theme’s “style.css” file. That should center the gallery.

    .galleria-container {
      margin: 0 auto;
    }

    For making it responsive, you could maybe contact the developers of that gallery plugin.

    Regards,
    Tobias

    Thread Starter luanafaria

    (@luanafaria)

    Thanks, Tobias!

    It worked and the gallery is already centered. 🙂

    Even adding the code:

    Galleria.run (, {responsive: true, height: 0.5, debug: false} ‘galleria.’);

    the gallery does not fit properly on tablet and mobile, but I’ll try to contact some developer of Galleria.

    Thanks a lot!

    Regards,
    Luana

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!
    Maybe TablePress will be useful for something else on your site in the future.

    Best wishes,
    Tobias

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

The topic ‘Center and Responsive table’ is closed to new replies.