Richard, it's not hard coded anywhere I can see - changes back at the source would need to be made to code that's filtered by PHP and then run by JavaScript before being rendered - so it's easy enough to change as BigNoseMac has done at his browser, on a one-off, but rather harder to do so two levels back. I fear that if I start something during the daytime and then end up with an effect wider than I expect, I would be likely to render the whole forum unstable in what's proving to be out rush-hour today ... in fact rather like cutting a signalling cable and then having to struggle to repair it. And I'm not honestly sure that I still have the skills to do the repair. If you're familiar with SMF▸ and can confidently point in the right direction or do the job, great - but even then in the middle of the night.
I'm not a PHP person, I'm afraid, let alone one who knows about SMF! But on a quick Googling...
It's clearly a known problem: see
here and
here. They seem to suggest it's a problem with the theme rather than SMF itself.
If you look through the JavaScript in each forum page, you'll see that there's a function smf_codeFix. This is setting the element height to (...offsetHeight + 20) + "px"; .
My guess is that, at the time this code is executed, offsetHeight is 0 because Chrome hasn't rendered it yet. Hence it's setting the height to 20px.
My suggested quick-and-dirty fix would be either not to run this code for elements with an offsetHeight of 0, or not to run it at all for Webkit browsers (Chrome/Safari). So you could change the code to:
(to stop the code executing at all under Webkit:)
function smf_codeFix()
{
if ('WebkitAppearance' in document.documentElement.style) return;
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");
for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}
or to:
(to stop it running for objects with offsetHeight of zero)
function smf_codeFix()
{
var codeFix = document.getElementsByTagName ? document.getElementsByTagName("div") : document.all.tags("div");
for (var i = 0; i < codeFix.length; i++)
{
if ((codeFix[i].className == "code" || codeFix[i].className == "post" || codeFix[i].className == "signature") && codeFix[i].offsetHeight < 20 && codeFix[i].offsetHeight)
codeFix[i].style.height = (codeFix[i].offsetHeight + 20) + "px";
}
}