WordPress.org

Forums

Jetpack by WordPress.com
Jetpack Tiled Galleries - Negative values for Width and Height (8 posts)

  1. George Olaru
    Member
    Posted 2 years ago #

    Hi,

    I have a problem with Jetpack Tiled Galleries - it doesn't set the right width and height for image containers. It just give negative values, like:

    <div class="gallery-group images-1" style="width: -2px; height: -1px;">

    Here is a live example: http://bit.ly/1ecYSx3

    Any ideas why this could happen ?

    Thanks,
    George

    http://wordpress.org/plugins/jetpack/

  2. Jeremy Herve
    Jetpack Mechanic
    Plugin Contributor

    Posted 2 years ago #

    Something seems off with your theme's $content_width value: it seems to be set to "lap-and-up-two-thirds" instead of an actual value in pixels (ref).

    Could you check your theme's functions.php and try to change that value to something like 690?

    You can also try to use this plugin to overwrite the current content width value:
    http://wordpress.org/plugins/custom-content-width/

    Let me know if it helps.

  3. George Olaru
    Member
    Posted 2 years ago #

    Hi Jeremy,

    We declared $content_width variable in functions.php like this:

    if ( ! isset($content_width)) {
    $content_width = 960;
    }

    I installed that plugin too but no change.

    .lap-and-up-two-thirds it's a CSS class from the grid system used. Do you have any ideas of why that class appear instead of width in pixels?

  4. Jeremy Herve
    Jetpack Mechanic
    Plugin Contributor

    Posted 2 years ago #

    Could you let me know how the grid system adds the classes to each element?

  5. George Olaru
    Member
    Posted 2 years ago #

    Classes are added directly from PHP - so isn't something dynamic using JS.

  6. Jeremy Herve
    Jetpack Mechanic
    Plugin Contributor

    Posted 2 years ago #

    Could you check that function and make sure it doesn't make changes to the content_width option? Could you also try the plugin I mentioned earlier and see if it helps?

  7. nuceman
    Member
    Posted 2 years ago #

    Hi there Jeremy,

    I'm currently using the theme linked in the first post and am having the same issue. I've tried the plugin you suggested but it's still returning negative values.

    I found a line in one of the theme's files that I believe may be the culprit but I'm not entirely sure what needs to be done to get it to work correctly.

    $content_width = $disable_sidebar == 'on' ? 'one-whole' : 'lap-and-up-two-thirds';

    Commenting out that line appears to fix the issue with the negative values but disables the sidebar of the theme automatically on all posts. I understand this is most likely a problem with the theme and not Jetpack itself but any insight would be greatly appreciated.

  8. Jeremy Herve
    Jetpack Mechanic
    Plugin Contributor

    Posted 2 years ago #

    @nuceman Could you please start a new thread about your issue?
    http://wordpress.org/support/plugin/jetpack#postform

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic