title: How can I position multiple Struts textfields into 4 seperate blocks in one form?
body: <p>I am creating a web app using Struts 2. I have several forms which have multiple textfields. I would like to position the textfields into four blocks but am having some difficulty as the struts tags do not recognize div tags and so I am unable to position with the use of CSS. I understand I can use cssClass but it seems very laborious to position each Struts textfield tag!</p>
  
  <pre><code>&lt;div id="updateMedicalInfoForm"&gt;        
    &lt;s:form action="editNewUser"&gt;
      &lt;img src="images/icaremark.jpg" alt=""&gt;
      &lt;h1&gt;Travel &lt;br&gt;Companion&lt;/h1&gt;
      &lt;div id="spacer"&gt;&lt;/div&gt;
      &lt;div id="spacer2"&gt;&lt;/div&gt;
  
      &lt;div id="medInfoEdit"&gt;
      &lt;h2&gt;Medical Information&lt;/h2&gt;
      &lt;s:textfield label="Doctor Name"  name="medicalInfo.doctorName" size="20" /&gt;
      &lt;s:textfield label="PracticeName"  name="medicalInfo.practiceName" size="20"/&gt;
      &lt;s:textfield label="Contact Number"  name="medicalInfo.practiceNumer" size="20"/&gt;
      &lt;s:textfield label="Allergies"  name="medicalInfo.allergies" size="20"/&gt;
      &lt;s:textfield label="Medication(s)"  name="medicalInfo.medications" size="20"/&gt;
      &lt;/div&gt;
      &lt;div id="surgeryAddressEdit"&gt;
      &lt;h2&gt;Surgery Address&lt;/h2&gt;
  
      &lt;s:textfield label="Name / No." name="medicalInfo.address.houseName" size="20" /&gt;
      &lt;s:textfield label="Address line 1" name="medicalInfo.address.addressLine1" size="20"/&gt;
      &lt;s:textfield label="Address line 2" name="medicalInfo.address.addressLine2" size="20"/&gt;
      &lt;s:textfield label="City" name="medicalInfo.address.City" size="20"/&gt;
      &lt;s:textfield label="Postcode" name="medicalInfo.address.postcode" size="20"/&gt;
      &lt;s:textfield label="Country" name="medicalInfo.address.country"  size="20"/&gt;
      &lt;/div&gt;
      &lt;div id="emergencyContactEdit"&gt;
      &lt;h2&gt;Emergency Contact&lt;/h2&gt;
  
      &lt;s:textfield label="Title" name="medicalInfo.nextOfKin.title" size="20" /&gt;
      &lt;s:textfield label="First Name" name="medicalInfo.nextOfKin.fName" size="20"/&gt;
      &lt;s:textfield label="Last Name" name="medicalInfo.nextOfKin.lName" size="20"/&gt;
      &lt;s:textfield label="Contact Number" name="medicalInfo.nextOfKin.contactNum" size="20"/&gt;
      &lt;s:textfield label="Email" name="medicalInfo.nextOfKin.email" size="20"/&gt;
      &lt;s:textfield label="Relationship" name="medicalInfo.nextOfKin.relationship" size="20"/&gt;
      &lt;/div&gt;
      &lt;div id="emergencyContactAddressEdit"&gt;
      &lt;h2&gt;Emergency Contact Address&lt;/h2&gt;
  
      &lt;s:textfield label="House Number / Name" name="medicalInfo.nextOfKin.address.houseName" size="20" /&gt;
      &lt;s:textfield label="Address 1" name="medicalInfo.nextOfKin.address.addressLine1" size="20"/&gt;
      &lt;s:textfield label="Address 2" name="medicalInfo.nextOfKin.address.addressLine2" size="20"/&gt;
      &lt;s:textfield label="City" name="medicalInfo.nextOfKin.address.City" size="20"/&gt;
      &lt;s:textfield label="Postcode" name="medicalInfo.nextOfKin.address.postcode" size="20"/&gt;
      &lt;s:submit name="update" id="redButton" value="%{getText('button.update')}"/&gt;
      &lt;/div&gt;
  &lt;/s:form&gt;
  </code></pre>
  
  <p></p>