CSS Max-Width in IE8

后端 未结 2 1181
萌比男神i
萌比男神i 2021-02-13 05:28

For my input, which can either have classname=\"half\" or \"half.not-placeholder-value\", Firebug shows both inputs to have a set, fixed width of

2条回答
  •  心在旅途
    2021-02-13 06:04

    Use IE8 css with width? First part targets IE, second part undoes it for IE9+.

    input.half, input.half.not-placeholder-value {
        max-width: 25em;
        width:25em\9; /* IE 8 */
    }
    :root input.half, input.half.not-placeholder-value {
        width:inherit\9; /* IE 9+ */
    }
    

提交回复
热议问题