WordPress.org

Ready to get started?Download WordPress

Forums

problem calling ie6 stylesheet (5 posts)

  1. la_ri_za
    Member
    Posted 4 years ago #

    Hi,
    I have problems calling my ie6 specific stylesheet. It worked great before but just now I noticed it doesn't upload it anymore and I can't figure what's causing the problem. This is how the code looks right before the body tag in my theme (I replaced my real domain with "blahblah.com"), you can find the conditional ie6 tag in the end:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"  />
    <title>blogi - Just another WordPress weblog</title>
    <meta name="description" content="some text." />
    <link rel="stylesheet" href="http://blahblah.com/wordpress/wp-content/themes/mytheme/style.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="http://blahblah.com/wordpress/wp-content/themes/mytheme/print.css" type="text/css" media="print" />
    <link rel="alternate" type="application/rss+xml" title="blogi RSS Feed" href="http://blahblah.com/wordpress/feed/" />
    <link rel="pingback" href="http://blahblah.com/wordpress/xmlrpc.php" />
    <meta name='robots' content='noindex,nofollow' />
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://blahblah.com/wordpress/xmlrpc.php?rsd" />
    <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://blahblah.com/wordpress/wp-includes/wlwmanifest.xml" />
    <link rel='index' title='blogi' href='http://leena.lala.fi/wordpress' />
    
    <meta name="generator" content="WordPress 2.8.2" />
    
    <!-- Start Of Script Generated By cforms v10.5.1 [Oliver Seidel | www.deliciousdays.com] -->
    <link rel="stylesheet" type="text/css" href="http://blahblah.com/wordpress/wp-content/plugins/cforms/styling/../../cforms-custom/minimal-books.css" />
    <script type="text/javascript" src="http://blahblah.com/wordpress/wp-content/plugins/cforms/js/cforms.js"></script>
    <!-- End Of Script Generated By cforms -->
    
    			<link rel="stylesheet" href="http://blahblah.com/wordpress/wp-content/plugins/wp-post-thumbnail/css/wppt.css" type="text/css" media="all" />
    
    <link rel="shortcut icon" href="http://blahblah.com/wordpress/wp-content/themes/mytheme/favicon.ico" />
    
    <!-- this product is released under General Public License. Please see the attached file for details. You can also find details about the license at http://www.opensource.org/licenses/gpl-license.php -->
    
    <script type="text/javascript"><!--//--><![CDATA[//><!--
    sfHover = function() {
    	if (!document.getElementsByTagName) return false;
    	var sfEls = document.getElementById("nav").getElementsByTagName("li");
    
    	for (var i=0; i<sfEls.length; i++) {
    		sfEls[i].onmouseover=function() {
    			this.className+=" sfhover";
    		}
    		sfEls[i].onmouseout=function() {
    			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    		}
    	}
    
    }
    if (window.attachEvent) window.attachEvent("onload", sfHover);
    //--><!]]></script>
    
    <!--[if lt IE 8]>
    <link href="http://blahblah.com/wordpress/wp-content/themes/mytheme/ie.css" rel="stylesheet" type="text/css" />
    <![endif]-->
    
    <!--[if lt IE 7]>
    <link href="http://blahblah.com/wordpress/wp-content/themes/mytheme/ie6.css" rel="stylesheet" type="text/css" />
    <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js" type="text/javascript"></script>
    <![endif]-->
    
    </head>

    I would appreciate if someone could point me to the right direction!

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Try:

    <!--[if lt IE 8]>
    <link href="<?php bloginfo('template_directory'); ?>/ie.css" rel="stylesheet" type="text/css" />
    <![endif]-->
    
    <!--[if lt IE 7]>
    <link href="<?php bloginfo('template_directory'); ?>/ie6.css" rel="stylesheet" type="text/css" />
    <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js" type="text/javascript"></script>
    <![endif]-->
  3. Edward Caissie
    Theme Review Admin
    Posted 4 years ago #

    You might consider changing the call to your CSS file to something more generic, such as:

    href="<?php bloginfo('template_directory'); ?>/ie6.css"

    Although generally I do not see any issue with your example "href"

    Hope that helps some ...

    <edit - should have known someone would get to this before I finished writing --- props to esmi!>

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    To be honest, I couldn't see much wrong with those conditional comments. The syntax looks right but I pasted in versions that I know work in case I'd missed something.

    @La_ri_za: Have you checked to see if your ie6.css sheet is present and intact?

  5. la_ri_za
    Member
    Posted 4 years ago #

    Hi, thanks for the answers! I tried those versions also but it doesn't have any effect. But actually, I got someone to check my site in another computer and for him it's working fine! Weird, I emptied the cache and history and everything but in my ie6 I cannot see it. :O Apparently it's just my ie6 causing this...???

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.