Fix inline-block for Internet Explorer 6 and 7

From The IT Community
Jump to: navigation, search




If your web site uses CSS code with inline-block, this will not work with Internet Explorer 6 and Internet Explorer 7.

Here is how to fix this, so that it will work in old and new versions of Internet Explorer.


So if this was your CSS code before:

#foo {
    display: inline-block;
}

than change this to

#foo {
    display: inline-block;
    *display: inline;
    zoom: 1;
}

and it will display correctly in those old versions of Internet Explorer.



Was this article helpful? Then please donate to keep The IT Community alive...

If you found this article helpful please share it, comment and help others by writing your own article.






Translate this page:




Articles found in the same category:
(max. 20 shown)