Support » Fixing WordPress » Custom .css for IE not working

  • Resolved felilikesflowers


    so I am finished with my website and it looks great on all major browsers except, of course, IE.

    I have spend the last 2 days looking all over the forums for an answer to why Internet Explorer isn’t reading the custom ‘iestyle.css’ file I created for it.

    It all seems very simple and makes a lot of sense to create a second css file just for ie, but for some reason it is not working for me.

    Any help with this would be greatly appreciated.

    I am working with IE7 and created a child theme of twenty eleven. The url is

    So I duplicated the style.css file, renamed it iestyle.css and uploaded it with my FTP client to my child theme’s folder ‘twentyeleventest’.

    In my header.php file I added this between the <header></header> tags:

    <!--[if lte IE 7]>
    <link href="" rel="stylesheet" type="text/css" />

    I tried out different versions for the url, but nothing seems to work.

    If everything would work fine, I would have to edit the custom .css file solely through the FTP client, correct?

    If anybody is out there that is familiar wit this old problem and can tell me how to overcome it, please help!!

    Thank you so much in advance,

Viewing 15 replies - 1 through 15 (of 45 total)
  • esmi


    Forum Moderator

    Have you validated your markup & CSS?

    Hello esmi,
    I did, it showed me 4 errors, but when I checked the errors all of them were actually correct and not wrong like the validator said. (It was mostly about missing closing tags ‘>’, which were all in place.)

    Do you have any other idea?

    I have to upload and access it via a FTP client, right?

    Thank you for your time!

    Moderator Andrew Nevins


    Forum moderator

    You ought to focus on the error message, not the highlighted red character in the error code example.

    Are you sure the the “iestyle.css” stylesheet isn’t loading? Have you tried checking the browser’s console using a developer tool like Firebug-Lite, or tried adding an obvious style in iestyle.css like body{background: red !important}?

    Hi Andrew,
    yes, I know for sure that the iestyle.css isn’t working. I have tried something similiar like you suggested. Thank you for the tip!

    When going over the errors with the validator, how do I know where the error is then, if it is not at the highlighted place? I can’t seem to find any errors in the lines suggested.

    Thank you for your response,

    This may help you with the validation issues:

    Thanks WPyogi for all the links, they are very helpful!

    But unfortunately that still doesn’t answer my question why my new iestyle.css file won’t be read. Is something wrong with the syntax I put in the header.php file?

    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    	 * Print the <title> tag based on what is being viewed.
    	global $page, $paged;
    	wp_title( '|', true, 'right' );
    	// Add the blog name.
    	bloginfo( 'name' );
    	// Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		echo " | $site_description";
    	// Add a page number if necessary:
    	if ( $paged >= 2 || $page >= 2 )
    		echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
    <link rel="profile" href="" />
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <!--[if lte IE 7]>
    <link href="" rel="stylesheet" type="text/css" />
    <!--[if IE ]>
    <style type="text/css">
    * {
    	/* We add some JavaScript to pages with the comment form
    	 * to support sites with threaded comments (when in use).
    	if ( is_singular() && get_option( 'thread_comments' ) )
    		wp_enqueue_script( 'comment-reply' );
    	/* Always have wp_head() just before the closing </head>
    	 * tag of your theme, or you will break many plugins, which
    	 * generally use this hook to add elements to <head> such
    	 * as styles, scripts, and meta tags.

    If anyone can help, please do!!

    Thank you,

    Moderator Andrew Nevins


    Forum moderator

    It isn’t loading because the file is not found.

    Hi Andrew,
    thank you for your response on both threads!

    If I go into the folders with filezilla it shows me that the file is there though….

    Do you have any idea why this is? Or is there another way of uploading the file?

    Thank you!!

    Moderator Andrew Nevins


    Forum moderator

    Can you send us a link to a print-screen of your filezilla directory, in which the stylesheet designates?

    Moderator Andrew Nevins


    Forum moderator

    What are the permissions on that stylesheet?

    I don’t know what ‘permissions’ means… :/

    It says numeric value: 644

    Owner permission: Read Write
    Group permission: Read
    Public permission: Read

    Moderator Andrew Nevins


    Forum moderator

    From your screenshot, you can scroll to the right here .
    Can you post another screenshot, but this time scrolled all the way to the right?

Viewing 15 replies - 1 through 15 (of 45 total)
  • The topic ‘Custom .css for IE not working’ is closed to new replies.