The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

jQuery Pin It Button For Images
Plugin Changing Picture Alignment (5 posts)

  1. mandalynne
    Posted 3 years ago #

    My blog is http://www.mommyoftwolittlemonkeys.com

    This plugin is great! But for some reason it's force aligning all of my images to the left side. Is there a fix for this please?


  2. Marcin Skrzypiec
    Plugin Author

    Posted 3 years ago #

    Unfortunately, if you're using not only basic wp classes (like alignright, alignleft, etc.) to position images, sometimes the plugin changes image alignment. It really depends on the styling of the image(inline css, classes, etc.). I'm aware of the issue, but didn't figure out a way to fix it in a way that will work well with any image styling. If you've stumbled upon a similar plugin that doesn't mess with image positioning, please let me know, I'll be happy to fix (or at least upgrade a little) this issue in my plugin.

    Or maybe you can disable the plugin on the main page and keep it active on single posts and pages?

  3. michaelcolenso
    Posted 3 years ago #

    Hey there -

    I had this issue as well, where the plugin was forcing all of the center-aligned pictures to be left aligned.

    I managed to fix this (for my particular case) by adding

    $('p').has('.pinit').css('text-align', 'center');

    to the script.js file of the plugin. I added it inside the jpibfiAddElements function. It sets the text-alignment to center for all 'p' elements that have child elements with the class .pinit.

    Just thought I'd let you know how I worked around the issue. It may not work for all cases, but it worked perfectly for my case...

    Thanks. Nice plugin, by the way. Works great.


  4. Marcin Skrzypiec
    Plugin Author

    Posted 3 years ago #

    Hi Mike, thanks for your input!

    Unfortunately, it's just like you've mentioned - your solution works great for your case, but not for all cases. For now, I don't have a good solution for all cases and I don't think forcing everyone to have centered images is a good thing. Thanks again.


  5. domenicatootell
    Posted 3 years ago #


    I'm having the same issue.

    If you find a solution that would be great.

    Thanks for creating this plugin!


    P.S. My site is http://www.easysewingforbeginners.com if you want to see the alignment issue

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • jQuery Pin It Button For Images
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.