I've got a form layout in which form elements are separated between 2 divs: one with float: left
, the other with float: right
. I have to keep it that way.
Is it fine to place form elements in different containers? Could I get any troubles with form validation or submitting?
What's the best way to do it, via hook_form_alter(), or something else?
P.S. I'm not developing a custom module, but a theme. Here is an example of the form HTML; it's not precisely what it's going to be, but it gives an idea.
<div class="custom-holder">
<div class="custom-box">
<div>
<input type="text" id="name" />
<label for="name">First name:</label>
</div>
</div>
<div class="custom-block">
<div>
<input type="text" id="surname" />
<label for="surname">Surname:</label>
</div>
<div>
</div>