Opens in a new tab
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);
});

nuria-garcia

Nuria García Macias

Born and raised in Ibiza, her passion is to communicate and inform, as well as to capture with her camera whatever interests her. She holds a degree in Communication and Audiovisual Journalism from the University of Lleida, and a degree in Professional Photography from the Leandre Cristófol School in Lleida. She currently works as a cover artist and writer for the Diario de Ibiza, where she interned for a summer while a university student.