This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
position:fixed; | |
width:100%; | |
top:0; | |
z-index:999; | |
// tutorial @ https://www.divithemeexamples.com/make-your-divi-4-0-header-sticky-or-fixed-with-the-theme-builder/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// When the user scrolls down 50px from the top of the document, resize the header's font size | |
window.onscroll = function() {scrollFunction()}; | |
function scrollFunction() { | |
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) { | |
document.getElementById("myheader").style.position = "fixed"; | |
} else { | |
document.getElementById("myheader").style.position = ""; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To create a child theme for Divi Theme (Elegant Themes) you will need the following 2 files | |
style.css | |
functions.php | |
Divi Child Theme zip available at https://www.divithemeexamples.com/bare-bones-divi-child-theme/ |