function updateHeaderHeight() {
        // Get the height of #brx-header
        const headerHeight = document.querySelector('#brx-header').offsetHeight;
          
        // Store the height in the CSS custom property --header-height
        document.documentElement.style.setProperty('--brxw-header-height', headerHeight + 'px');
    }

    // Execute the function as soon as the document is ready
    document.addEventListener('DOMContentLoaded', function() {
        updateHeaderHeight();  // Initial update of header height when the document is ready

        // Update the header height on window resize and orientation change
        window.addEventListener('resize', updateHeaderHeight);
        window.addEventListener('orientationchange', updateHeaderHeight);
});

Hello! Welcome to my daydream

I quit my job, converted an old van into my travelling home and set off travelling. Things evolved way beyond what I ever imagined. I want to show you how possible this is! See About

Subscribe to VandogTraveller

Join over 5k people who get my email updates

No spam. Ever. Unsubscribe easily anytime

Category

Popular posts

View all popular posts
Category

Living the Vanlife

View all vanlife posts
Category

Van conversion

View all Van conversion posts