Home › Forums › Support › no padding when I use media/text block with media (photo) on the left side
- This topic has 17 replies, 2 voices, and was last updated 1 year, 7 months ago by
Leo.
-
AuthorPosts
-
June 16, 2019 at 10:03 am #931519
Alana
Hi,
I’ve noticed that when I use a media/text block in a post (with the photo on the left and the text on the right), there is no padding for the image on the left side. I would like the photos to line up with my overall post text on the left. Please let me know how I can do this.
Thank you!
AlanaJune 16, 2019 at 1:43 pm #931639Leo
StaffCustomer SupportHi Alana,
I checked the page but not sure which image you are referring to?
I don’t see a image on the left with text on the right.
Let me know if I’m missing something π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 16, 2019 at 3:12 pm #931671Alana
Hey Leo, please see this Destinations – North America – article for an example of the issue:
https://www.coursecharted.com/destinations/north-america/vegan-restaurants-las-vegas/
It recurs every time I use a media + text block (the text or photo I’m using goes all the way to the left of the page instead of aligning with the rest of the content).
Thanks for your help!
June 16, 2019 at 3:27 pm #931677Leo
StaffCustomer SupportCan you try this CSS?
.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull { margin-left: 0; width: inherit; max-width: inherit; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 16, 2019 at 3:31 pm #931679Alana
Should I put it into Simple CSS or into the CSS at the bottom of the post?
June 16, 2019 at 3:34 pm #931681Leo
StaffCustomer SupportTry the global editor of SimpleCSS.
If you add it to the metabox at the end of the post, it will only apply to that specific post.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 16, 2019 at 3:38 pm #931683Alana
That didn’t work, puzzling… thank you for your efforts though, I appreciate it Leo! Any other ideas?
June 16, 2019 at 3:41 pm #931684Leo
StaffCustomer SupportNot seeing the CSS being added at all.
Any caching plugins?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 16, 2019 at 3:43 pm #931686Leo
StaffCustomer SupportAlso looking at the source, you already have CSS added in the Additional CSS field in the customizer so might as well add the extra CSS at the same place π
Then you shouldn’t really need SimpleCSS at all.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 16, 2019 at 4:03 pm #931696Alana
I added it, looked for the change and then removed the code when it didn’t work. I’ve added it back so you can check it out. Thanks!
June 16, 2019 at 4:48 pm #931703Leo
StaffCustomer SupportEdited the CSS above:
https://generatepress.com/forums/topic/no-padding-when-i-use-media-text-block-with-media-photo-on-the-left-side/#post-931677Can you give it another shot?
Please leave the code in even if it doesn’t work – it’s impossible for us to tell why something doesn’t work without seeing it π
Thank!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 16, 2019 at 5:18 pm #931706Alana
Hey Leo, thanks for your help, it seems to have helped with most of the media / text blocks! But, the media / text block under the “PublicUs” subheading at the link below has moved to the right too much and is now not aligned with the rest of the content.
https://www.coursecharted.com/destinations/north-america/vegan-restaurants-las-vegas/
June 16, 2019 at 5:28 pm #931710Leo
StaffCustomer SupportSo it is actually still aligned, just that WordPress added default padding to the text part which makes it look like misalignment – it is the same when text is on the right.
https://www.screencast.com/t/zo4hiQCfHIWould you mind trying another solution?
So instead of using text & media block, try using columns block instead to create your own text and media part.
I believe that should offer much more flexibility.
Let me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 16, 2019 at 5:42 pm #931712Alana
Thanks for the info, Leo, I appreciate you taking the time to help me and walk me through this!
Is there code I can use to remove that padding? Or will it mess up other areas?
I can try to use columns from hereon-out but there’s no quick way to transform the existing text/media blocks as far as I can tell.
June 16, 2019 at 5:56 pm #931713Leo
StaffCustomer SupportTry this CSS:
.wp-block-media-text.has-media-on-the-right .wp-block-media-text__content { padding-left: 0; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.