Today I was working on a new wordpress theme and I discovered this Error/Bug in Google Chrome. What is the bug? Well it would not show the background of the body properly.
Every other browser like Firefox and I.E will show the background fine, but Chrome will show no background, or simple plane white color. While I used built in Element Inspect tool in Chrome, I see there it has applied blank background. I searched the Web, and found many fixes, but this is what worked for me:
Simple add to your CSS stylesheet this line:
html{ height: 100%;}
Also you may replace your Body tag, with Html,Body i.e.
Body
{some css here}will become
Html,Body
{same CSS here.}
Hope this saves you some time and solve your problem.
Regards,
Mohsin Rasool
Gabo says
Hi,
This is not a bug in Chrome, but the way you designed your css/html structure (maybe using height 100% on the ?). As a rule you should keep styling rules applied to visible elements (i.e. and it’s children). I have found very very few exceptions to this, and usually the need to apply css rules to the tag is because of cross browser problems that IE6 has with absolute and fixed positionings.
Oliver says
Ha, thanks a bunch! And so easy…
I have been bashing my head on figuring out why Chrome was being such a pain and stopping the background from rendering on the page after the last element. Now I can move on to more important duties like hacks for IE6 π
Cheers
Mohsin Rasool says
Hi Gabo,
thanks for your input!
Hi Oliver,
You are always welcome! I am glad that this post was
any help to you…
/oh yeah IE6! What a headache!
Best Regards,
Mohsin Rasool
Sjoerd Faerber says