How do I indent the H3s in the TOC?

#896239
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello, we’re sorry to hear about the issue you’re facing with the Table of Contents (TOC). To maintain the indent for H3 headings in your TOC after removing the bullets, you can add custom CSS to your theme’s style.css file. Here’s a CSS snippet that should help you achieve the desired indentation:

    .wp-block-rank-math-toc-block nav ul {
        list-style-type: none; /* Remove bullets */
        padding-left: 0; /* Remove default padding */
    }
    
    .wp-block-rank-math-toc-block nav ul li {
        padding-left: 20px; /* Adjust this value for indentation */
    }
    
    .wp-block-rank-math-toc-block nav ul li h3 {
        margin-left: 20px; /* Indent H3 headings */
    }

    You can adjust the padding-left and margin-left values to get the exact indentation you want. After adding this CSS, make sure to clear any caching on your site to see the changes.

    If you need further assistance, please reply to this ticket, and a human agent from the Rank Math Support team will be happy to help you out!

    Sources:
    How to Add Rank Math’s Table of Contents Block » Rank Math

    Elmer
    Rank Math free

    Hello,

    Please update the CSS to this one only:

    .wp-block-rank-math-toc-block nav ul li{
        margin-left: 20px; 
    }

    And here’s a guide on how to add custom CSS to your site:
    https://www.wpbeginner.com/plugins/how-to-easily-add-custom-css-to-your-wordpress-site/

    Hope that helps.

    Elmer
    Rank Math free

    Still that didn’t work

    Hello,

    We have tested the CSS in our test install and the indentation of headings is working fine.

    Could you please let us know how you applied the CSS code to your site?

    Also, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.

    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Elmer
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    We replaced the former CSS code with the following and it works correctly:

    #rank-math-toc > nav > div > div:nth-child(n) > div {
    	margin-left: 20px;
    }

    Kindly check and confirm that this issue is now resolved.

    Please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

The ticket ‘How do I indent the H3s in the TOC?’ is closed to new replies.