Reputation: 8810
I use a CSS trick where I set position: absolute
on an element, and then set like left: 0px; right: 70px
to make sure that the element spans the whole length of the parent, but always leaving 70px space to the right.
However, I recently found that this trick does not work in IE9 for text input elements. The "left" and "right" properties does not alter the default width of the element at all. Does any one know a workaround for IE9?
Please see this fiddle, although you have to be viewing it in IE9 to see the effect...
Upvotes: 1
Views: 406
Reputation: 324650
Input elements don't like being stretched like that. Put it in a containing <div>
, position the <div>
, and then use width:100%
on the input.
Upvotes: 3