Powered by Vanilla 1.1.4.
Recently I worked on a project that required some of the form fields to be stacked horizontally. For those cases and the like, a special class .col was introduced in the latest version of Uni-Form but for a different purpose - to enable a multi columnar layout of forms. It was originally meant to be added to the fieldset element along with the .blockLabel or .inlineLabel classes, so you could float the fieldsets and make columns. Take a look at the screenshot below that illustrates this "alternative" usage of the .col class.

See how some of the fields are grouped in line with each other? This was done simply by adding a float to the .col class (no width though) and the line dividers are simple hr elements (horizontal rules, also used to clear the floats) helping to differentiate the types of information neede from the user for input into logical chunks.
I just wanted to share this since it was ridiculously easy to do this, and I think this could come in handy to someone. Cheers people, enjoy the rest of your weekend!
Thanks for this... still I'm not quite sure how you did this... a snippet of source code perhaps?
thanks!
Jay - I just added the .col class on the .ctrlHolder div and added these styles for it:
.uniForm .col{ width:280px; /* Required property */ float: left; clear: none;}
Also I have added the horizontal separators (the dotted lines you see in the pic) like so:
<div class="hr"><hr /></div>
(the point of the div around the hr element is for IE unfortunately)
And I have styled it like so:
.hr{ clear:both; margin:10px 0 0 0; background: #fff; border: none; border-top: 1px dotted #dfdfdf;} hr{ visibility: hidden; font-size: 0; line-height: 0; height: 0; border: none; }
Hey Dragan,
I'm feeling a little thick.. I am unable to reproduce your results.
I'm fairly sure I followed your instructions above to the letter. Would it be possible to post a complete example?
Thanks
1 to 4 of 4