#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    156
    Rep Power
    13

    CSS & IE not picking up the IE stylesheet


    Hi

    I have got a oscommerce website and am having great difficulty getting IE to pick up the external IE CSS stylesheet

    Not sure where I am going wrong

    The coding linking the stylesheet is below

    Code:
    <!--[if IE]>
    <link rel="stylesheet"type="text/css" href="allieonly.css" />
    <!--[endif]/-->
    The css stylesheet starts with the following

    Code:
    <style> and ends with </style>
    Where am I going wrong with it

    Kind regards

    Ian
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    14
    Rep Power
    0
    Good afternoon,

    Have you noticed next to "rel="stylesheet" there is no space to separate the "type" attribute from the "rel" attribute.

    Also try removing the "/" after the "[endif]".

    Try replacing your code with the one below:

    Code:
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="allieonly.css" />
    <![endif]-->
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    156
    Rep Power
    13
    Hi Jezza

    Thank you for the reply

    Good Afternoon, hope you having a good one so far

    Ahh just noticed the gap as soon as you mentioned it

    I'll replace the coding with what you pasted in and try that

    Thank you, will let you know if it works

    Kind regards

    Ian
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    14
    Rep Power
    0
    No problem. Hope it works out for you.

    Thanks,

    Josh.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    156
    Rep Power
    13
    Still don't seem to be picking it up for some reason

    The website is www.newtests.co.uk

    It is ok in Google Chrome but in the IE10, the search button is above the search field so am trying to move the search field over to the left and put the search button next to it

    I am looking in the developer tools in IE and the allieonly.css file is not showing in the list of css files attached

    Does that mean I am coding it wrong somewhere
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    156
    Rep Power
    13
    Think it is working now

    I put the following in as you said

    Code:
    <!--[if IE 9]>
    <link rel="stylesheet" type="text/css" href="ie-only.css" />
    <![endif]-->
    I just renamed the css file to ie-only.css and seems to be working now

    Thank you for the replies etc

    Kind regards

    Ian
  12. #7
  13. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,131
    Rep Power
    4304
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo