tomrobinson Posted July 5, 2020 Share Posted July 5, 2020 Site URL: https://nextcitylawyer.com/free-resources/the-truth-about-virtual-vacation-schemes Good afternoon I have added anchor links to the blog posts on my website in order to make it easier for visitors to navigate long blog posts. The anchor link functionality works well, but the code block includes a substantial amount of top and bottom padding which breaks up the page. It's more than the equivalent with a conventional h3 header. <p id="attitude"><h3> 1. Attitude </h3></p> This is an example of the code that I have used on the linked page. Is there a way to reduce the vertical padding between the blocks of the text? Thanks for your help in advance. I regard anchor links as a core feature of any blogging platform so it would be very useful to get some guidance on this issue. Link to comment
rwp Posted July 5, 2020 Share Posted July 5, 2020 .sqs-block.code-block.sqs-block-code * { margin-top: 0px !important; margin-bottom: 0px !important; } .sqs-block.code-block.sqs-block-code { padding-top: 0px !important; padding-bottom: 0px !important; } That will remove the top and bottom spacing from the code blocks and elements inside the code blocks. If you have other code blocks that you want to keep the padding and margins on, this can be adjusted to target specific pages and/or code blocks. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.