Hi, I’m facing not a problem but problems of uncombatability of IE. I’m writing the css code based on Firefox using Web Developer Toolbar (Addon) and the work is being Excellent on Firefox and also on Safari and when checking on IE, some contents of the page have a displacement from it location or another something, so this make me unhappy.
So, how to prevent this uncompatability or how to solve or there is any way to add a separate css file for each design work only with IE which fix wrongs with the page content of each design.
I think all suffer from this problem so i hope that experienced developer could help.
You can use conditional statements to target IE browsers:<!—[if lte IE 6 ]> <![endif]—>
This statement will target everything below IE7 . You can also use it to target everything below IE7 (lte IE 7 ) and so on. Use google to find out more. I use this technique only if there is a lot to fix, otherwise it try to debug things in regular stylesheet. In most of cases it’s the matter of giving the element layout or changing display property. If you google “IE6 bug list” or something like that you will find lots of materials about IE6 bugs.
The complete conditional could be:
<!--[if IE]> <style type="text/css"> /* example of innline styles here, for any IE version */ </style> <![endif]--> <!--[if lte IE 6]> /* for IE 6 */ <link rel="stylesheet" href="css/ie6.css" type="text/css" media="all" /> <![endif]--> <!--[if lte IE 7]> /* for IE7 */ <link rel="stylesheet" href="css/ie7.css" type="text/css" media="all" /> <![endif]--> <!--[if lte IE 8]> /* for IE8 */ <link rel="stylesheet" href="css/ie8.css" type="text/css" media="all" /> <![endif]-->
This works for me and have no problems with validation or IE bugs.
Also i suggest to embed a reset css stylesheet first of all.
+1 for CSS reset.
I will add one more thing – remember to link to the IE specific CSS after the general stylesheet so that the normal rules are overridden by IE rules.
The problem with js in that case is if js is not enabled on user machine.
I found working with conditionals to be the best chance on this…
The problem with js in that case is if js is not enabled on user machine. I found working with conditionals to be the best chance on this…
Im generally in the same boat, Ive never actually had to use the js method,... but it has been very helpful for some people I know . Seems like a lot of people [on themeforest] dont test for graceful js degradation anyways