Say, I have the following unordered list. The button has width: auto. How do I style the elements, so #textField would stretch as much as possible,
This is possible with CSS in user agents with CSS-2.x-supporting layout engines:
…
-
Tested positive in the following browsers:
Please note that paddings and margins on input elements will interfere because of the fixed width.
But: I can see no good reason why you should not use a table element here (tables and CSS do mix). Semantically it would make sense (the table would be serializable), and compatibility will be very likely better than with the CSS display property values above:
-
It is also possible that you should have used only a table element here in the first place.