that happen because firefox 3 (& opera 9+) fully support CSS 2.1 specs but not firefox 2.
here’s some code add in your theme’s functions.php.
function embed_gecko_styles(){
$ua = trim($_SERVER['HTTP_USER_AGENT']);
$firefox_majv = 'Firefox/3'; // firefox 3 specificly
$release_version = 'rv:1.9'; // gecko like 1.9 engine
if ( strpos($ua,$release_version) || strpos($ua,$firefox_majv)){
?>
<style type="text/css" media="screen">
/*<![CDATA[*/
#header,#footer{margin-left:-1px !important}
/*]]>*/
</style>
<?php
}
}
if ($is_gecko){
add_action('wp_head','embed_gecko_styles');
}
Hi Kaizer,
I tried pasting that in various places in my functions.php, each time getting a sidewide error and having to manually overwrite with the original.
The error message begins with:
Parse error: syntax error, unexpected T_IF, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in…
I understand that this an issue related to standards and compatibility, but I’m wondering if there is a fix. Otherwise I’d have to choose a different theme.
I dont find any syntax error with my code.
Kaizer, thanks for posting your fix here. Which part of function.php file do you paste that in? Is there anything else that I need to modify in order to add this function?
Update: I tried using a different theme (which doesn’t happen to have any rendering issues with FF3) and I didn’t have any issues adding that function to functions.php. Actually the functions.php for that them didn’t contain any other functions.
Just in case anyone wants to take a look at the function.php file of the theme that I’m trying to fix (the one that’s giving me the error when I add the above function), I’ve posted it at http://www.starvingseo.com/function.txt
P.S. Kaiser, your own blog also seems to be broken when using FF3.
Wondering if anybody else is having a similar problem, or using this theme?