Better Fullscreen Headers in IE

Written by Dan Mossop

The Divi Theme's full width header module comes with a handy "full screen" mode, which makes the module not only full width, but also full height. This allows you to easily add attention grabbing pages to your site, such as the example above which I quickly knocked up. Unfortunately, they don't look so great in Internet Explorer…

Fullscreen Headers in IE

This is as it appears in Google Chrome. However, as Mark kindly pointed out to me, it's a different story when the full width header is viewed in Internet Explorer:

Notice that the content isn't vertically centered any more, reducing the impact of the header.

And in older versions of Internet Explorer, things get worse. Here's the same page viewed in IE9:

Notice now that there is a gap between the Divi header and the full width header module background.

Fixing Fullscreen Headers in IE

Without boring you with the details of the specific IE bugs and incompatibilities involved, I found I was able to make the fullwidth header (fullscreen) mode behave better in IE with the following:

<style>
body 
  .et_pb_fullwidth_header.et_pb_fullscreen 
    .et_pb_fullwidth_header_container {
  height: 1px;
}
</style>

<!--[if lte IE 9]>
<style>
.et_pb_fullwidth_header.et_pb_fullscreen 
  .header-content-container.center { 
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}
.et_pb_fullwidth_header.et_pb_fullscreen 
  .header-content-container.bottom { 
  position: relative;
  top: calc(100% - 80px);
  transform: translateY(-100%);
}
.et_pb_fullwidth_header.et_pb_fullscreen 
  .header-content { 
  float: none !important; 
  margin:0; 
  width: 100%; 
}
</style>
<![endif]-->

Note that this is wrapped in conditional HTML tags and so should be treated as HTML, not plain CSS. To add it to Divi, I suggest putting it into the "Divi > Theme Options > Integration > Add code to the <head> of your blog" box.

This code fixes various issues to get the fullscreen fullwidth headers displaying correctly in IE 9 and above. Note that I haven't attempted a fix for IE8 and below as these browser versions have significant additional incompatibilities and are dwindling in usage.

Fixing Fullscreen Headers in IE using Divi Booster

I've added an option to my Divi Booster plugin to easily implement the IE fullscreen header fixes. Simply go to "Modules > Header (Fullwidth)" and you'll see:

Tick the "Fix fullscreen mode display issues in IE" option, save the settings, and you're done.

The option is available in Divi Booster version 2.1.2 and higher.

Check out Divi Booster

Take control of your Divi site's appearance across all browsers with Divi Booster. This powerful plugin comes packed with features, including easy fixes for fullscreen header display issues in Internet Explorer, ensuring your site looks great for every visitor.

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

11 Comments

  1. Hi Dan, this works once, when I go to the website again it goes back to how it was before the fix. If I update the integration page it fixes the issue on IE, but then it goes back to how it was. How can I make this a permanent fix? Thank you.

    Reply
    • Hi Cat, I'm not sure what's causing this problem for you – the fix as described should be permanent… Any chance you can send me a link to the page you're working on so that I can take a look at what's going on? Thanks!

      Reply
      • Thanks for your reply, I've attached the website address, it's the second header of the home page. Thank you

        Reply
        • Hi Cat, thanks for the URL and sorry I'm only now getting back to you.

          It looks like the problem is a result of the caching you have enabled on the page (using Comet Cache). Divi adds a CSS class to the body element of the page to indicate which browser is being used (chrome, IE, etc), and my code makes use of this to detect and apply the code only on IE. However, the caching is breaking this and sometimes a user on IE is shown a page which has the class from a different browser, such as Chrome. That's what's causing the intermittent issues you've been seeing.

          There are two ways I can see to fix this. One is to disable caching on the home page. The other is to change the second line of code in my fix from "body.ie" to just "body". While this means the fix code will be applied on all browsers, I've done some testing and it doesn't seem to affect how the header looks in other browsers.

          I hope that helps.

          Reply
          • Just to follow up, I've applied that code change in the post above and in the next version of Divi Booster (2.5.6). Thanks!

      • Hi Dan,

        could you please look at my website, and point out where is my error?

        I appreciate this,

        Cat

        Reply
  2. Did not work. Purchased Plugin. Also did not work.

    Reply
    • Hi Fred, I'm sorry to hear that. Is there any chance you're able to send me a link to the page your working on so that I can take a look at what's going on?

      Reply
  3. Thanks so much for this fix!

    Reply
  4. Dan, this is a good fix. I was experiencing this problem with the Extra theme and this tip fixes the issue. Good to also add to your Extra Booster plugin.

    Reply
    • Thanks for letting me know, Glen. Yes I'll definitely include this in Extra Booster when it's ready. Cheers!

      Reply

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

Your email address will not be published. Required fields are marked *.

We may earn a commission when you visit links on our website.

Latest Posts

Set Custom CSS IDs for Individual Divi Accordion Items

Assigning unique CSS IDs to specific Divi Accordion items allows for precise control over styling, targeting, and linking within your page content. This ability is particularly useful when you want to apply custom designs or create anchor links to particular accordion...

Enable Swipe Navigation in the Divi Gallery Lightbox

Enabling swipe navigation in the Divi Gallery module's lightbox allows users to seamlessly browse through gallery images by swiping left or right, creating a more interactive and mobile-friendly experience. This functionality can significantly improve user engagement...

Disable Slide-In Animation for Divi Gallery Grid Images

Control how images appear in your Divi Gallery module by toggling the slide-in animation effect for grid layouts. Disabling the slide-in animation allows gallery images to load instantly and appear statically, providing a faster and distraction-free browsing...

Control Image Count Display in Divi Gallery Lightbox

Displaying or hiding the image count in the Divi Gallery module’s lightbox can help customize the user experience, depending on whether you want to give visitors an indication of gallery progress or prefer a cleaner, distraction-free view. The ability to toggle this...

Hide Gallery Image Titles in the Divi Lightbox Overlay

Displaying image titles in the lightbox overlay of the Divi Gallery module can sometimes be distracting or unnecessary, depending on your website’s design and user experience goals. Hiding these titles creates a cleaner and more focused viewing experience for visitors...

Random Posts