[Resolved] Container internal margin not working

Home Forums Support [Resolved] Container internal margin not working

Home Forums Support Container internal margin not working

  • This topic has 9 replies, 5 voices, and was last updated 1 year ago by David.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1483271
    Julien

    Hello guys,

    My container internal margin is set to 40 px (up, down, right and left) and working fine when posting image or texte but not if I insert a “media and text” native wordpress block. No matter if I put the media right or left, it will show as if margin was set to 0 px on the media size. And it’s ugly : D

    That’s a very strange issue. You can check from link inserted in my profile on homepage (photo of me and my son)

    Regards

    #1483440
    Leo
    Staff
    Customer Support

    Hi there,

    Try unchecking the align wide setting in the media/text block.

    #1483537
    Julien

    Hello Leo,

    Thank you but it’s unchecked.

    regards

    #1483692
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    The block still has the alignwide class: https://www.screencast.com/t/Mo3TQtJK

    This means the alignment is still set. Can you double-check? Usually you need to click the checked option and it will un-check itself (there is no clear/no align button for some reason).

    #1483755
    Julien

    I am sorry I did not get it first. Now it’s unchecked but it still doesn’t work.

    Media is showing fine but the container margin si also changed on the text side with a margin showing something like 80 px instead of 40 px as selected in GP.

    #1483904
    Elvin
    Staff
    Customer Support

    Media is showing fine but the container margin si also changed on the text side with a margin showing something like 80 px instead of 40 px as selected in GP.

    What your seeing is the default padding added to the block through .wp-block-media-text .wp-block-media-text__content.

    This class adds padding: 0 8%;. You can override this by custom CSS.

    .wp-block-media-text .wp-block-media-text__content{
    padding: 0 5% 0 0;
    }

    This removes the seemingly unwanted padding on the left so the media text aligns with the other contents on the page.

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

    #1484250
    Julien

    Thank you Elvin.but it fixes the problem on the text side buit introduces a new problem on the media size with a 0 padding making text touching the media. How to fix it so it looks good with a little padding between media and text ?

    Also, isn’t it a bug ? Why default block doesn’t align with everything else ?

    #1484582
    David
    Staff
    Customer Support

    Hi there,

    The CSS you have added looks like this:

    .wp-block-media-text .wp-block-media-text__content {
        padding: 0 0 0 0;
    }

    Can you change it to the rule that Elvin provided ie.

    .wp-block-media-text .wp-block-media-text__content{
        padding: 0 5% 0 0;
    }

    You can change the 5% to any % or pixel value if you want.

    #1484637
    Julien

    Damn ! You are right, it works now.
    I will mark as solved.

    Thanks

    #1484649
    David
    Staff
    Customer Support
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.