Reply To: Lock header area/menu to ALWAYS on top of screen?

#8056
Ron
Keymaster

This is really not how the theme was made but you can force it to act like that. Try the codes below. This could affect other aspects of the theme though.

Add to child-theme’s functions.php

add_action( 'frontier_before_container', 'ra_before_container' );
add_action( 'frontier_after_menu', 'ra_after_menu' );

function ra_before_container() {
	echo '<div id="fixed-container">';
}

function ra_after_menu() {
	echo '</nav></div><nav>';
}

Add to child-theme’s style.css

#fixed-container {
   max-width: 100%;
   position: fixed;
   width: 960px; //Change to your header width
}

#main {
   margin-top: 205px; //Change to your header height
}