Contents Step 1 — Open Blogger Theme Go to Blogger Dashboard Click Theme Click ▼ Click Edit HTML STEP 2 — ADD CSS Find this code: </head> Paste THIS code just ABOVE it: <style> #light-toc{ background:#f5f5f5; padding:15px; border-radius:6px; margin:20px 0; border:1px solid #ddd } #toc_list{ font-weight:bold; cursor:pointer; margin-bottom:10px; font-size:20px } #toc li{ margin:8px 0 } #toc li a{ text-decoration:none; color:#222 } #toc li a:hover{ color:#1e90ff } .toc-h3{ margin-left:20px } .toc-h4{ margin-left:40px } </style> STEP 3 — ADD JAVASCRIPT Find: </body> Paste THIS code just ABOVE it: <script> document.addEventListener("DOMContentLoaded", function () { const toc = document.getElementById("toc-content"); if(!toc) return; const headings = document.querySelectorAll(".post-body h2, .post-body h3, .post-body h4"); headings.forEach((heading, index) => { const id = "heading-" + index; heading...
Comments
Post a Comment