SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Location
    Hillsborough NH
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE8 is rendering all of my media queeries. How do I stop this?

    if you look at my site www.opentech-us.com in IE8 you will see it looks like crap and from what I can tell it would seem that IE8 is reading ALL the CSS styles in my style sheet and completely ignoring the media queries I have written....meaning it is just reading EVERYTHING which in the order of the cascade means the last overriding rules in my sheet are for my mobile styles, which I think is why my site looks like crap in IE8. Is there a way I can get IE8 to recognize these properly? What are my options? Please help!
    Matt Nelson
    Nelson Design Studios
    www.nelsondesignstudios.com

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,112
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    IE8 does not recognise @media rules. You could offer it special styles via conditional comments, though.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Location
    Hillsborough NH
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you please share an example of what you mean by conditional comments?
    Matt Nelson
    Nelson Design Studios
    www.nelsondesignstudios.com

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,281
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    That's the drawback of the "mobile first" approach in that IE8 and under get the basic versions as they don't understand media queries.

    If you don't want to use conditional comments you could add just add media query ability with a small script.

    https://github.com/scottjehl/Respond

    The css reference has examples of how to use Conditional comments and it will basically mean duplicating the styles that you are supplying to wider devices.

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Location
    Hillsborough NH
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you please look at my source on the homepage and look at line 94. I did uplaod the Respond.js stuff and it didn't do anything.....did I do something wrong?
    Matt Nelson
    Nelson Design Studios
    www.nelsondesignstudios.com

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,281
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    The file is not at the location you are suggesting:

    http://d8ddhackmznr5.cloudfront.net/.../respond-ie.js

    Error 404 - Page not found!


Tags for this Thread

Bookmarks

Posting Permissions

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