WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. george.olaru
    Member
    Posted 6 months 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
    Happiness Engineer
    Plugin Author

    Posted 6 months 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 6 months 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
    Happiness Engineer
    Plugin Author

    Posted 6 months ago #

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

  5. george.olaru
    Member
    Posted 6 months ago #

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

  6. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 6 months 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 3 months 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
    Happiness Engineer
    Plugin Author

    Posted 3 months ago #

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

    Thanks!

Reply

You must log in to post.

About this Plugin

About this Topic