1
我想添加一個名爲ie.css的只有css文件的Internet Explorer。Internet Explorer css:Joomla自定義模板
我已經建立了一個簡單的自定義joomla模板,它在每個瀏覽器中工作正常,除了....通常的罪魁禍首IE瀏覽器!
我已經將ie.css添加到了css文件夾,並且我正努力使文件只能從IE中讀取。 這是我的PHP文件:
<?php
$doc = JFactory::getDocument();
$doc->addStyleSheet('templates/' . $this->template . '/css/main.css');
$doc->addStyleSheet('templates/' . $this->template . '/css/header.css');
$doc->addStyleSheet('templates/' . $this->template . '/css/footer.css');
$doc->addStyleSheet('templates/' . $this->template . '/css/container.css');
$stylelink = '<!--[if lte IE 9]>' ."\n";
$stylelink .= '<link rel="stylesheet" href="/css/ie.css" />' ."\n";
$stylelink .= '<![endif]-->' ."\n";
$document = JFactory::getDocument();
$document->addCustomTag($stylelink);
$doc->addScript('/templates/' . $this->template . '/java/java.js', 'text/javascript');
?>
<!DOCTYPE html>
<html>
<head>
<jdoc:include type="head" />
<!--[if gte IE 9]>
<style type="text/css">
.gradient {
filter: none;
}
</style>
<![endif]-->
<!--[if IE]>
\t <link rel="stylesheet" type="text/css" href="css/ie.css" />
<![endif]-->
</head>
<body>
<div id="back">
<jdoc:include type="modules" name="background_image" style="none" /></div>
<div class="wrapper">
<div id="logo"><jdoc:include type="modules" name="logo" style="none" /></div>
<div class="menu">
<jdoc:include type="modules" name="nav-main" style="none" />
</div>
<div class="container">
<jdoc:include type="component" />
<div id="home_content_top">
<jdoc:include type="modules" name="content_area_one" style="none" />
</div>
<div id="home_discount">
<jdoc:include type="modules" name="content_area_two" style="none" />
</div>
<div id="footer">
<jdoc:include type="modules" name="footer" style="none" />
</div>
</div>
</div>
</body>
</html>
我在哪裏出了錯?
非常感謝你! – ADRIAN 2014-11-23 07:32:19