This can normally be fixed using the @import function, but if this can not be used, try tying out this.
Code: Select all
<?php
$nav = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : '';
if (stristr($nav, "msie"))
{
echo "ie-css.css";
}
else
{
echo "templatecss.css";
}
?>
This function can be expanded to use different browsers, as shown below.
Code: Select all
<?php
$nav = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : '';
// checks if browser is Internet Explorer
if (stristr($nav, "msie"))
{
echo "ie-css.css";
}
// checks if browser is Mozilla
elseif (stristr($nav, "moz"))
{
echo "mozilla-cssfile.css";
}
// checks if browser is Netscape
elseif (stristr($nav, "ns"))
{
echo "netscape-css.css";
}
// If browser is a different one
else
{
echo "templatecss.css";
}
?>
Code: Select all
<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php $iso = split( '=', _ISO );
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php mosShowHead(); ?>
<!-- Smart Template Chooser -->
<!-- Created By Jon Hurlock -->
<link rel="stylesheet" type="text/css" href="<?php echo $mosConfig_live_site;?>/templates/
<?php
$nav = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) ? strtolower( $_SERVER['HTTP_USER_AGENT'] ) : '';
// checks if browser is Internet Explorer
if (stristr($nav, "msie"))
{
echo "ie-css.css";
}
// checks if browser is Mozilla
elseif (stristr($nav, "moz"))
{
echo "mozilla-cssfile.css";
}
// checks if browser is Netscape
elseif (stristr($nav, "ns"))
{
echo "netscape-css.css";
}
// If browser is a different one
else
{
echo "templatecss.css";
}
?>
/>
</head>
<body>
<h1>The Body Text For Your Site</h1>
</body>
</html>
Anyway i hope this helped.
Jon