Archived topic
Remove padding between paragraph and list
3 replies · Started by Alan on June 1, 2022
Hey guys,
What's the best way to remove the padding between paragraph blocks and list blocks without adjusting the padding of all paragraph blocks?
I'd like to remove the unnecessary space between Amenities: and the bullet points on the page linked to this topic.
Thank you for your help!
Hi there,
Do you plan to use GenerateBlocks?
That would be the easiest method without CSS.
Let me know :)
Hey Leo,
I have GenerateBlocks installed and tried to work through the padding using a grid, but couldn't quite figure it out or find a good resource immediately to help.
Feel free to just point me to a resource if it's super simple to do!
Cheers,
Alan
Hi Alan,
Here’s a document you may refer to with regards to GB Grid Blocks: https://docs.generateblocks.com/article/grid-overview/
You’ll also find the articles with regards to the other Blocks here: https://docs.generateblocks.com/collection/blocks/
Lastly, I also find this video very helpful in understanding how to use GenerateBlocks: https://www.youtube.com/watch?v=R7fwJECtgSg
Now, with regards to the spacing you’re referring to, to clarify, is this one of them?: https://share.getcloudapp.com/o0uGjre1
If so, the List Block has a default Bottom Margin.
One approach is to place the List Block in a Container Block and add a negative margin as such: https://share.getcloudapp.com/12uL5Gvm
Another approach is to alter this margin through custom CSS. Here’s a CSS you may try adding in Appearance > Customize > Additional CSS:
ul, ol {
margin-bottom: 0px !important;
}
Kindly modify 0px with your preferred value.
If you want this to take effect only on single posts, use this instead:
.single-post ul, .single-post ol {
margin-bottom: 0px !important;
}
Hope this helps!