IE doesn't support height=auto for images, what should I use?

前端 未结 11 1021
太阳男子
太阳男子 2021-01-03 22:51

I have some images with height=auto because sometimes they are different heights whereas they are always the same width. It works in every browser but I.E., is there someth

11条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-03 23:53

    In "IE9 compatibility view - IE7 Standard Document mode" leaving off height=auto may not solve the problem. Try adding conditional CSS and in your special css file for IE ("ie.css") add a line that assigns the appropriate min-height to your affected class/element.

    for example:

    .IE7 .[css element] {min-height: xxxpx;}

    Where xxx equals the necessary image height.

提交回复
热议问题