- This topic has 9 replies, 5 voices, and was last updated 3 years, 6 months ago by David.
-
AuthorPosts
-
October 11, 2020 at 7:40 am #1483271Julien
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
October 11, 2020 at 8:14 am #1483440LeoStaffCustomer SupportHi there,
Try unchecking the align wide setting in the media/text block.
October 11, 2020 at 9:37 am #1483537JulienHello Leo,
Thank you but it’s unchecked.
regards
October 11, 2020 at 11:38 am #1483692TomLead DeveloperLead DeveloperHi there,
The block still has the
alignwide
class: https://www.screencast.com/t/Mo3TQtJKThis 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).
October 11, 2020 at 12:39 pm #1483755JulienI 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.
October 11, 2020 at 3:50 pm #1483904ElvinStaffCustomer SupportMedia 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.
October 12, 2020 at 12:28 am #1484250JulienThank 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 ?
October 12, 2020 at 4:49 am #1484582DavidStaffCustomer SupportHi 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.October 12, 2020 at 5:34 am #1484637JulienDamn ! You are right, it works now.
I will mark as solved.Thanks
October 12, 2020 at 5:41 am #1484649DavidStaffCustomer SupportGlad to hear that!
-
AuthorPosts
- You must be logged in to reply to this topic.