Archived topic
Formatting Issues on Single Posts (gaps and spacing)
5 replies · Started by Josh on May 3, 2018
I'm running into an issue where there are no gaps below subheads when creating posts in the WP post editor.
For instance, when I preview or publish a post there are no gaps under <h2> headings.
I tried:
.single-post h2 {
margin-bottom: 24px !important;
}
... with no result. The declaration shows as applied in Chrome inspector, but the H2's stubbornly stay with the next paragraph butted up right under the subhead.
I don't see any controls for margin bottoms on Headers in GP's WP Customizer.
How can I get the subheads to behave in my posts? Thanks
PS - note that the URL I'm giving you is a staging site with the single posts layout a work in progress.
Hi there,
You have some CSS setting your h2 elements to display: inline, which will disable margins: https://www.screencast.com/t/QUStIUKI19
I'm not sure where it's coming from, as you're using Autoptimize, but hopefully that helps you pinpoint it.
Let me know :)
Great, thanks Tom!
I'm using a border-image declaration on the bottom of h2's sitewide to put a handwritten style border underneath.
The display-inline allowed the border image to reach only to the ends of the text - instead of stretching the full width of the element.
Do you know of a way to get that effect without the inline declaration offhand? Ive searched...coming up with nothing.
GP is a great product, thanks for all of your hard work.
Try display: inline-block :)
*smacks forehead* Of course! lol
Thanks man
No problem! :)