tuanphan Posted August 10 Share Posted August 10 To reduce space between Heading - Paragraph You can use these CSS code. #1. Reduce space between Heading - Paragraph on All Blocks h1, h2, h3 { margin-bottom: 0px; } h1+p, h2+p, h3+p { margin-top: 0px; } result like this #2. Reduce space between Heading - Paragraph on Specific Text Block First, you need to find ID of Text. You can use below tool. In my example, we will have: #block-yui_3_17_2_1_1722898813189_4140 Next, use this CSS code #block-yui_3_17_2_1_1722898813189_4140 { h1, h2, h3 { margin-bottom: 0px; } h1+p, h2+p, h3+p { margin-top: 0px; }} #3. Reduce space on Mobile Only @media screen and (max-width:767px) { h1, h2, h3 { margin-bottom: 0px; } h1+p, h2+p, h3+p { margin-top: 0px; }} #4. Reduce space on Desktop Only @media screen and (min-width:768px) { h1, h2, h3 { margin-bottom: 0px; } h1+p, h2+p, h3+p { margin-top: 0px; }} #5. Reduce space on One Page only First, find Page ID. Use #2 tool. In my example, we will have: #collection-66aef2caff007776a825a948 Next, use CSS code #collection-66aef2caff007776a825a948 { h1, h2, h3 { margin-bottom: 0px; } h1+p, h2+p, h3+p { margin-top: 0px; }} Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment