This topic contains 6 replies, has 2 voices, and was last updated by  PenciDesign 2 weeks, 4 days ago.

Margin around images

  • Hi,

    I would like to add some margin on the top and bottom of all the images, so the text is not so close to the image.

    How can I do this?

    Thanks!

    Thanks

    Hi,

    By default, this theme already have that margin.
    Can you show me an screenshot about that?

    Best Regards,
    PenciDesign

    Hi,

    I know there is some space before and after the image, but I would like to increase the top and bottom margin on the images, and between paragraphs.

    https://drive.google.com/file/d/0B28r9kvk2u5aWThyOVE4NU5ULUk/view?usp=sharing

    https://drive.google.com/file/d/0B28r9kvk2u5aNTJyb2hBVVZncVk/view?usp=sharing

    Thanks.

    Hi,

    1/ To increase the top and bottom margin on the images, please add more this code to Customize > Custom CSS:

    .alignnone, .alignleft, .alignright, .aligncenter{ margin-top: 30px; margin-bottom: 30px; }
    

    Change number ’30’ to the size you want.

    2/ To increase space between paragraphs, please add more this code to Customize > Custom CSS:

    .post-entry p{ line-height: 1.8; }
    

    Change number ‘1.8’ to the size you want. Example: 1.9 or 2.0

    Best Regards,
    PenciDesign

    Hi,
    Thanks for your answer.

    The code you provide for the margin around the images works on pages, but on posts with caption.

    Besides I don’t know why it works if I put it in the custom CSS part, but not on the child theme file.

    THanks.

    Hi,

    1/ If so, please try again with this code:

    .post-entry .alignnone, .post-entry .alignleft, .post-entry .alignright, .post-entry .aligncenter, .post-entry .wp-caption.alignright, .post-entry .wp-caption.alignnone, .post-entry .wp-caption.alignleft, .wp-caption.aligncenter{ margin-top: 30px; margin-bottom: 30px; }
    

    2/ If it doesn’t work on child theme, you should check again all your custom css code. You have a other custom css code override on it.

    Best Regards,
    PenciDesign

You must be logged in to reply to this topic.