Skip to content

Instantly share code, notes, and snippets.

DiviThemeExamples

Block or report user

Report or block DiviThemeExamples

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:878444d4904a161edde29930db2ab5b0
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/
View gist:4157272a6bde0707141d1ffa4867296e
<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 = "";
}
View Divi Child Theme
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/
You can’t perform that action at this time.