Support » Plugin: WP Photo Album Plus » Set margin around photo in a post

  • Resolved guiguilyon

    (@guiguilyon)


    Hello,

    I’m using the [photo random] shortcode and “Replace shortcode by html” (thanks again for adding it) from Table IX-L-7.1 to add a single picture next to some text is my posts.

    My problem is that the picture is really close to the text.

    I’d like to be able to format the display of the picture so that there is space around it or at least just between it and the text. Is there a way to specify some margins around the single pictures in posts with WPPA? I looked in WPPA settings but couldn’t find it.
    Also, can I add a border or any other “fanciness” around the picture ?

    I asked to my theme (Weaver Xtreme) developpers and they say there would be a margin around the picture if I’d use the WordPress Add media button, but since I’m using WPPA shortcodes to get a random image, I don’t get margins.

    Any idea please?

    Thank you! 🙂

    • This topic was modified 1 year, 3 months ago by  guiguilyon.
    • This topic was modified 1 year, 3 months ago by  guiguilyon.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Unfortunately you did not metion what the settings Table IX-L2,3 and 4 are.
    Preferrably set Table IX-L4 to ‘left’.

    Your theme does apparantly not have some standard wp styles, but you can add it simply as custom css, either in the wp customizer, or in Table IV-A15:

    .alignleft {
        float: left;
        margin: 0 10px 5px 0;
    }
    

    This is the wp standard for left aligned items.

    Alternatively – in case this interferes with other things on your site – you can specifically add custom css for the wppa single image, depending on the type of single image:

    A plain single photo:

    .wppa-sphoto {
        margin: 0 10px 5px 0;
    }
    

    A single photo with caption:

    .wppa-mphoto {
        margin: 0 10px 5px 0;
    }
    

    A single photo with extended caption:

    .wppa-xphoto {
        margin: 0 10px 5px 0;
    }
    

    Thanks for your reply!

    My settings for Table IX-L2,3 and 4 were : A plain single photo, 350, left.

    I added the code in Table IV-A15 and it works! I now have a nice margin between the text and photo! I had to reload the page twice after adding the CSS in WPPA settings for it to take effect on the post.

    Thank you very much! 🙂

    I haven’t noticed that it interferes with anything on my website. But just in case, where should I add this code if I ever need to? :

    .wppa-sphoto {
    margin: 0 10px 5px 0;
    }

    I found something weird.

    I deleted the previously mentioned css code in WPPA settings ( Table IV-A15).

    I changed Table IX-L-2 from “A plain single photo” to “A photo with caption”. And the photo has a margin betweeen it and the text! I tried with the other IX-L-2 settings. All of them, except “A plain single photo”, let the margin appear.

    Could there be a bug with this setting?

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    This is not weird. Plain means as plain as plain can be.
    With caption means: treat as if it is a standard wp media item.

    Oh, that makes sense now!
    That was a total noob misunderstanding of my part.

    Thanks for your time! 😃

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Set margin around photo in a post’ is closed to new replies.