Grow your CSS skills. Land your dream job.

IE conditional statements not working in IE 6.0

  • # August 13, 2010 at 1:39 pm

    Hi,

    I am currently working on a website. to avoid the IE hacks i put separate style sheet for IE browser.
    the format is shown below. but it is not working for me. any suggestions please…………

    <!–[if IE]>
    <link rel="stylesheet" type="text/css" href="ie-style/all-ie-only.css" />
    <![endif]–>

    <!–default style sheet–>
    <link rel="stylesheet" type="text/css" media="screen" href="css/reset.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="css/default.css" />

    is it right? in default style page container width is 960pixels center and in all-ie-only.css, i make it as width 100%.
    but its not working. i dont know what went wrong. anyone suggest me the solution.

    Thanks in advance.

    regards,
    yesvinkumar.a
    http://inspied.com

    # August 13, 2010 at 2:18 pm

    IE conditional stylesheet must come AFTER the other style sheets otherwise they will just be overwritten

    Code:
    <!–default style sheet–>
    <link rel="stylesheet" type="text/css" media="screen" href="css/reset.css" />
    <link rel="stylesheet" type="text/css" media="screen" href="css/default.css" />

    <!–[if IE]>
    <link rel="stylesheet" type="text/css" href="ie-style/all-ie-only.css" />
    <![endif]–>

    # August 14, 2010 at 5:18 am

    Hi Mark,

    Thank you very much for the kind advice.

    I hope you have more experience in css than me. I am a newbie of css. so if your time permits please guide me to develop my self as good web designer/developer and also please critique my website’s under construction page. It will help me to develop version 1.0 of my fully functional website.

    regards,
    yesvinkumar.
    http://inspied.com

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".