Results 1 to 2 of 2

Thread: Conditional Statement, should be working..but isn't

  1. #1
    Join Date
    Jan 2008
    Posts
    26

    Conditional Statement, should be working..but isn't

    I am trying to use the below statement to fix some problems with rendering in IE6, this is the code i am using but IE6 is still using the style.css file and not the iespecific.css file. Does anybody see a problem here or have any other ideas why this isn't working? help wll be much appreciated

    <!--[if lte IE 6]>
    <link href="css/iespecific.css" rel="stylesheet" type="text/css" media="screen" />
    <![endif]-->
    <link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />

    MitchR

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    A browser processes a page code from the top, so it reaches the [if lte IE 6] and then reaches the main stylesheet link and overrides the previous styles if there are the same ones in the main stylesheet.

    Always put the conditional comment after main stylesheets.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •