On page load the white background can be delayed, causing the page text to show briefly on the blue background until the page fully loads. A fix for this is to use the "Clearfix" css trick below. I'll roll a patch when I get back home.

There's two elements to this fix, the CSS, and the class call in page.tpl.php.

First add the CSS class "clearfix" to the #page div. (approx line #51 of page.tpl.php)

<div id="page" class="clearfix">

Then add the following CSS to the bottom of the layout.css:

/* clearfix magic */

.clearfix:after {
	content: ".";
	display: block;
	clear: both;
	visibility: hidden;
	line-height: 0;
	height: 0;
}
 
.clearfix {
	display: inline-block;
}
 
html[xmlns] .clearfix {
	display: block;
}
 
* html .clearfix {
	height: 1%;
}

This will cause the #page div to extend to the end of the page content without needing to wait for the page to completely load.

Comments

monotaga’s picture

hyrcan, any update on this? Thanks!

wildlife’s picture

Version: 6.x-2.9 » 6.x-2.96

I'm having this same issue with the page text loading before the white background, and so it is showing on the dark background image for a few moments on some slower page loads. I have tried the fix shown in the original post but it didn't solve the problem here. I'm using version 6.x-2.96

If I could just delay the page text load until after the white background loads, it would be fine. But the few moments of dark text on a dark background do not look good and may force a change in themes to something else. Any advice on fixing this issue would be appreciated.

oadaeh’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

This issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-4.x branch.
Thank you.