This article was published more than a year ago, there may have been developments.
Please take this into account.

After a long hiding in the field of articles devoted to the network, here we are talking about CSS and web. In today's article we take a look at some interesting hacks to be included in our CSS to fix bugs (and there are many) of Internet Explorer, version 7 and the following.

An important prerequisite to do is undoubtedly count IE6 from the browser no longer supported because obsolete. Incidentally if anybody cares to point out the site “ie6nomore“, initiative which has as its purpose to make coscenti users who use IE6 that it is a old and flawed browser, and therefore should be replaced. The site provides a few lines of code HTML to join its website that allow the user to directly download a browser undoubtedly better.

A first step was to declare the version 6 Internet Explorer obsolete and unsuited to navigation, others will follow, but in the meantime let's see how to give a view the site correctly the Microsoft browser that still resist the declaration of obsolescence: IE7 and IE8.

We can use these 3 variants directly attribute to target the css code on IE7 and 8 (and lower) depending on the need.

IE7 and lower

body {  color: #FFF;
 *color : #DDD; /* IE7 e inferiori*/

IE8 and lower

body {
color: #FFF;
color : #CCC\9; /* IE8 e inferiori */

A different technique, but with the same result is that of “conditional comment” with which you can assign code CSS depending on the IE version. This method, must be called in a page HTML and not in the CSS.

This is.

<!--[if IE 6]>
Istruzioni per IE 6

Obviously the use of these hacks should not be necessary. So let's use them only in case of extreme need.


I keep this blog as a hobby by 2009. I am passionate about graphic, technology, software Open Source. Among my articles will be easy to find music, and some personal thoughts, but I prefer the direct line of the blog mainly to technology. For more information contact me.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.