Steve,
Your CSS declaration above is a little off. Let's take a different direction anyhow. The best way to proceed is to add a class to the field via the admin. For my test, I added the class "two_columns" to all but the last of the fields.
screenshot
For the very last field in the series, I added a different class.."two_columns_last". We need this one to clear the float so everything below that lines up correctly.
screenshot
So, once that's added. You can add this to your theme's style.css file.
.gform_wrapper ul#gform_fields_1 li.two_columns, .gform_wrapper li.two_columns_last {width:48%; height:140px; float:left; border:1px solid #eee; margin:0 10px 14px 0!important}
.gform_wrapper ul#gform_fields_1 li.two_columns_last {clear:right}
You can see the result of my test.. screenshot
So, you'll notice a couple of things. The file upload field is different depending on the browser you're using and it may or may not fit the way you hope. If you used the "top label" option for your form, you'd have a better chance of it fitting in the space horizontally. It's something you may want to play around with.
Also, unrelated to the styling, I'm not sure that many file upload fields is going to be a good idea from a performance or usability standpoint. If the validation returns an error, you may have to re-populate all of those fields again before sending. If not, then you're going to try to push all of these files up to the server at one time and may end up with upload errors or timeouts. Just something to think about as well.
Posted 14 years ago on Friday September 3, 2010 |
Permalink