[Resolved] Adding Margins to Images Inside Blog Posts

Home Forums Support [Resolved] Adding Margins to Images Inside Blog Posts

Home Forums Support Adding Margins to Images Inside Blog Posts

  • This topic has 3 replies, 2 voices, and was last updated 1 year ago by Elvin.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1453201
    Christian

    Hey, Team!

    How could I increase the top and bottom margins for images added to blog posts.

    Like images added with Gutenberg’s Image block, not Featured Images.

    I’d also like to add this margin only to the images inside blog posts, not the homepage or other any other pages. ๐Ÿ™‚

    #1453210
    Elvin
    Staff
    Customer Support

    Hi Christian,

    You can do that with custom CSS.

    body.single figure.wp-block-image img{
    	margin-top:50px;
    	margin-bottom:50px;
    }

    This will only apply to Gutenberg image blocks placed on posts.

    A wise man once said:
    "Have you cleared your cache?"

    #1453221
    Christian

    Gotcha!

    Thanks, Elvin. You’re cooler than Perry the platypus! ๐Ÿ™‚

    #1453278
    Elvin
    Staff
    Customer Support

    lol. how I wish I could life a cool life of a spy.

    No problem.:)

    A wise man once said:
    "Have you cleared your cache?"

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.