Skip to content Skip to sidebar Skip to footer

Css Max-width In Ie8

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 25em. input.half, input.half.not-place

Solution 1:

This is not really an IE8 issue since IE8 does support the max-width attribute but only when given a defined width first.

input.half, input.half.not-placeholder-value {
    width: 100%;
    max-width: 25em;
}

Solution 2:

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 */
}
:rootinput.half, input.half.not-placeholder-value {
    width:inherit\9; /* IE 9+ */
}

Post a Comment for "Css Max-width In Ie8"