How to fix display:inline-block on IE6?

巧了我就是萌 提交于 2019-11-28 11:17:55

You have to re-specify display:inline; on block level elements in your IE style sheets.

HTML:

<div class="ImageSlideShow">blah</div>

REGULAR CSS:

.ImageSlideShow { display:inline-block; } 

IE CSS:

<!--[if lt IE 8]>
<style>
.ImageSlideShow { display:inline; zoom:1; }
</style>
<![endif]-->

See: http://work.arounds.org/using-inline-block-ie7-and-ie6/

BONUS:

You should also specify display:inline; for .ImageSlideShow .ImageNum {} to alleviate another IE bug.

* html p { display: inline; zoom: 1; }

http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/

In IE6 you can set display:inline-bock only to real inline elements like span or a.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!