ec25 Posted October 25, 2023 Posted October 25, 2023 Is there. a way to use make this code mobile friendly with CSS? As in, make the folder title a link to another page and then have another page under it for a dropdown menu. div.header-nav-folder-content { margin-top: -1.5rem;} .header-nav-folder-item:first-of-type a { opacity: 0;} Here is my website https://www.erinncapko.com/
tuanphan Posted October 27, 2023 Posted October 27, 2023 Mobile friendly - What do you mean? 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!)
ec25 Posted October 27, 2023 Author Posted October 27, 2023 17 hours ago, tuanphan said: Mobile friendly - What do you mean? As in, is there a way to make the folder header covered by a link and then have a page underneath, much like the web version of my website with CSS?
Solution tuanphan Posted October 30, 2023 Solution Posted October 30, 2023 You can add this code to Website Tools (under Not Linked) > Code Injection > Footer (DO NOT add to Custom CSS) <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).ready(function() { $('.header-menu-nav-folder[data-folder="/surface-design"]').appendTo('[data-folder="root"]>div>div>.container.header-menu-nav-item:nth-child(2)'); $('a[data-folder-id="/surface-design"]').click(function() { $(this).toggleClass('tp-burger-folder'); }); }); </script> <style> .header-menu-nav-folder[data-folder="/surface-design"] { display: block !important; position: relative !important; transform: unset !important; overflow: hidden; height: auto !important; transition: all 0.3s; } .header-menu-nav-folder[data-folder="/surface-design"] .header-menu-controls { display: none; } a.tp-burger-folder+.header-menu-nav-folder[data-folder="/surface-design"] { height: 100% !important; } .header-menu-nav-folder[data-folder="root"] { transform: unset !important; overflow: hidden; } [data-folder="/surface-design"] a { margin-top: 5px; margin-bottom: 5px; white-space: nowrap; } [data-folder-id] { margin-top: 10px; margin-bottom: 10px !important; } a[data-folder-id] span:nth-child(2):after { content: "\e009"; font-family: 'squarespace-ui-font'; } a[data-folder-id] { white-space: nowrap; } </style> 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!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment