It is possible to make the textfields on the left fill all the gray space to the right in a elastic way using CSS?
I did a jsFiddle example for you, demonstrating how you could do it. It's not the most approriate way because it's not dynamic. For example, the input
fields must have a 50%
width to fill in the space.
If you decide to have 4 input fields, you'd have to change from 50%
to 25%
.
But have a look at the example here: http://jsfiddle.net/peduarte/FwxhT/
Another way to do this, would be using javascript to calculate the gap and do a calculation to apply the remainder to the inputs, but again, not a great thing to do...
尝试<input type="text" style="width: 100%" />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.