Forums

IE Stylesheet Conflict with Default Style (3 posts)

  1. junkhed1
    Member
    Posted 2 years ago #

    Hello everyone I could really use some help with this situation as its not really getting any clearer after hrs of trial and error. I am trying to finish up my site design at http://www.randyniles.com/wordpresss and in FF and Safari & Opera its looking okay with a few minor tweaks I was working on before I was to tackle IE. Now I've moved over to creating a stylesheet for IE to correct the issues that I saw when viewing the site on my other computer (PC) with IE installed. I searched and found how to call the sheet in the WP Header and got everything rolling but whats weird is that in some cases when I apply styling say a background color to a div just to see what I'm working with in my default stylesheet I noticed that when viewed in IE the style was applied there too... making me wonder if some of the issues I am having has to do with IE picking up extra styles from another sheet. Is this how its suppose to work? I'm still new to this but weird things like not being able to style h1 tags etc in the IE stylesheet but being able to do it in the default seems odd. Is there a conflict with maybe where I have the information positioned in my header.php file? Here is my file with the coding in it... Thanks in advance if anyone can assist in this.

    <!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">
    <head>
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type');?>; charset=<?php bloginfo('charset');?>"/>
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="pingback" href="<?php bloginfo('pingback url'); ?>" />
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/img/favicon.ico" />
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen"/>
    
    <!--[if gte !IE]>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/ie.css" />
    <![endif]-->
    <?php wp_head(); ?>
    
    </head>
    
    <?php echo is_single() ? "<body class='single'>" : "<body>"; ?>
  2. s_ha_dum (was apljdi)
    Member
    Posted 2 years ago #

    IE will read and apply all of the style from the default stylesheet. The style inside the IE conditional tag should have priority ( because in your code it comes after the main stylesheet ) and so overwrite the other styles for only those elements named in the ID stylesheet. However...

    1. I don't know what 'if greater than or equal to not IE' (<!--[if gte !IE]>) means.
    2. If you have carefully considered and valid markup you should need very little IE conditional stuff.
    3. Globally targeting IE may not be the best idea since they all work frustratingly differently
  3. junkhed1
    Member
    Posted 2 years ago #

    Thanks for the information apljdi I checked the css files and came up good on the validation markup. I came across the <!--[if gte !IE on the web while looking for solutions to setting up IE stylesheets to help get the IE browser to look much like the design in FF, Safari and opera I forgot to add in it <!--[if gte !IE 6 not sure if that makes much of a difference or not. I'm still fairly new to the whole thing.. Is there another method of coding this that I should use which would be more effective? Thanks again for all the info.

    Yea I didn't really have to alter much in the IE coding just a few small things here and there. One thing I would like to know is it not correct to use say padding-left: -400px in IE I noticed that when I did validating before for something else the errors I received were that the use of negative # was not correct.

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic