document.addEventListener("DOMContentLoaded", function() { // 1. Controlla se siamo ESCLUSIVAMENTE nella pagina CMS 148 if (document.body.classList.contains('cms-id-148')) { var banner = document.querySelector('.header-banner'); var footer = document.querySelector('footer') || document.body; if (banner && footer) { // 2. Sposta fisicamente l'HTML del banner in fondo alla pagina (nel footer) footer.appendChild(banner); // 3. Applica gli stili di posizionamento direttamente sull'elemento banner.style.position = 'fixed'; banner.style.bottom = '0'; banner.style.left = '0'; banner.style.right = '0'; banner.style.width = '100%'; banner.style.zIndex = '99999'; banner.style.top = 'auto'; // Aggiunge un piccolo margine in fondo al body per non coprire il contenuto finale document.body.style.paddingBottom = '80px'; } } });
Ti serve aiuto?