Link to home
Start Free TrialLog in
Avatar of Al4ddin2
Al4ddin2

asked on

Building responsive website in IE8

I know that media queries are not supported in IE and below, so I am keen to understand how <IE9 browsers treat them? Do they just ignore any styling withing a media query and use the base styles? My aim is to build mobile up so does that mean that IE8 would use the mobile style?

Also what are my options for getting around this? I have read a little on respond.js or is it better to use a specific IE CSS instead or like the 320 and up framework it appends a class to the html tag when being viewed in <IE9 so that over-writing styles can be used but this will bloat the CSS will it not?

Any advice would be great.

Thanks
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Also what are my options for getting around this?
Don't support IE8 - seriously - unless your client is chained to it don't support it.

There is no reason IE8 should continue to go on living - it is a thorn in the side of web dev and needs to go the way of IE6.

Rather spend your time on HTML5 and build a great 21st centuary site.
+1 for what JulianH has said... Don't support it if you don't need to.

I would like to know WHY you want to support IE8.  Where did this come from?
Avatar of Al4ddin2
Al4ddin2

ASKER

Stats. We still have enough users on IE8 to warrant the people above wanting to support it. Plus a lot of people at the company use it.
Fair comment so sounds like your hands are tied for the moment.

As for the media queries, they are just ignored by < IE9.  The accepted way around this is to use IE's conditional commenting:

<link rel="stylsheet" type="text/css" media="all" href="style.css"/>
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" media="all" href="style-ie.css"/>
<![endif]-->

Open in new window

[NFP - not for points]
Just to clarify
unless your client is chained to it don't support it.
Seems like you are in the unfortunate position of having to develop for it.

Tagit has you on the right track but consider mentioning to your client that supporting IE8 is expensive in terms of time and they should consider upgrading.
What about respond.js?

Surely that would be easier that maintaining two stylesheets? no?

Thanks
Just because you have to support IE8 does not mean you have to support it on devices IT DOES NOT SUPPORT.

Do an IE8 stylesheet and leave it at that any effort to enhance the IE8 experience on non-supported devices is going to be as productive as using a tennis racket with no strings.

Cd&
ASKER CERTIFIED SOLUTION
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial