It is possible to make the textfields on the left fill all the gray space to the right in a elastic way using CSS?
Asked
Active
Viewed 107 times
1
-
Please can you share current code. – Sameera Thilakasiri Nov 29 '11 at 16:51
-
Read my answer below please. I've also created an example for you and it would be nice of you to reply. – peduarte Nov 29 '11 at 17:19
2 Answers
1
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...

peduarte
- 1,667
- 3
- 16
- 24