Why do Firefox and Opera ignore max-width inside of display: table-cell?

后端 未结 9 682
别跟我提以往
别跟我提以往 2020-11-27 13:49

The following code displays correctly in Chrome or IE (the image is 200px wide). In Firefox and Opera the max-width style is ignored completely. Why does this

9条回答
  •  渐次进展
    2020-11-27 14:09

    The w3.org spec states that max-width does not apply to inline elements, so you will get inconsistent behavior across browsers. I'm not sure of your intended outcome, but you may achieve it if you set div img { display:block } and then align the img and p tags with floats instead of standard inline.

提交回复
热议问题