- This topic has 9 replies, 3 voices, and was last updated 3 years, 8 months ago by
Fernando.
-
AuthorPosts
-
July 19, 2022 at 7:38 pm #2287987
Mark
Hi,
How can I increase the gap of white between the bottom of images (with and without captions) and the next element? This will be a site-wide problem
I have added an example URL with many examples below.
Thanks
July 19, 2022 at 8:55 pm #2288019Leo
StaffCustomer SupportHi Mark,
Try adding this CSS:
.wp-block-image { margin-bottom: 1em; }Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know if this helps 🙂
July 20, 2022 at 6:21 pm #2289020Mark
That does work. Thank you.
How do you determine the element name (in this case .wp-block-image)? I’m assuming I can do this for adding margins above and below iframes, youtube videos etc.
Rather than me opening up new tickets, I might be able to do all this myself
Cheers
July 20, 2022 at 6:57 pm #2289035Fernando Customer Support
Hi Mark,
Here’s an article with regards to CSS selectors: https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors
Then, a shortcut way to do it is this:
1)Â Hover the cursor over the element and hit right click on your mouse.
2) Select Inspect.
3)Â See the highlighted code.
4)Â Right click on the highlighted code.
5) Select Copy > Copy selector or get the class or another selector as mentioned in the article above: https://share.getcloudapp.com/JruoEbwyHope this clarifies!
July 26, 2022 at 10:03 pm #2294668Mark
Thanks Fernando. I was able to do this for videos. What about iframes? I can’t seem to get it to work for Instagram or Google Map embeds. Check out the URL in the private area to see what I mean. What do I add for that?
July 26, 2022 at 10:51 pm #2294695Fernando Customer Support
It should work as well with the right CSS selector.
Example:
.single-post iframe { margin-bottom: 1em; }or
iframe { margin-bottom: 1em; }Kindly let us know how it goes.
July 27, 2022 at 9:52 pm #2295680Mark
Hi Fernando,
This works for Google Map embeds:
iframe {
margin-bottom: 1em;
}But no joy for Instagram and other embeds. For example, look under item 1 in the Private area. This did not work for the embeds:
.single-post iframe {
margin-bottom: 1em;
}Cheers
July 27, 2022 at 10:11 pm #2295683Fernando Customer Support
It has inline CSS added which takes precedence over CSS added through Additional CSS or any other stylesheet.
Try making it:
iframe { margin-bottom: 1em !important; }for it to become higher in specificity over the inline margin it has.
July 27, 2022 at 10:37 pm #2295688Mark
Excellent! Thank you.
July 27, 2022 at 10:43 pm #2295692Fernando Customer Support
You’re welcome Mark!
-
AuthorPosts
- You must be logged in to reply to this topic.