I am defining a table which has UI elements like a drop down list , textbox and predefined texts in a page..
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmt_bg" vspace="0" hspace="0">
<tr>
<td valign="top"><p class="formheading">School:</p></td>
<td valign="top" class="cmt_left_bdr"><p class="formheading"><c:out value="${bean.school}"/></p></td>
<td valign="top"><p class="formheading">Department:</p></td>
<td valign="top" class="cmt_left_bdr"><p class="formheading"><c:out value="${bean.department}"/></p></td>
</tr>
<tr>
<td valign="top"><p class="formheading">Entry Time:</p></td>
<td valign="top" class="cmt_left_bdr"><p class="formheading"><c:out value="${bean.entryTime}"/></p></td>
<td valign="top"><p class="formheading">Exit Time:</p></td>
<td valign="top" class="cmt_left_bdr"><p class="formheading"><c:out value="${bean.exitTime}"/></p></td>
</tr>
<tr>
<td valign="top"><p class="formheading">Long Description:</p></td>
<td valign="top" class="cmt_left_bdr"><p class="formheading"><c:out value="${bean.longDesc}"/></p></td>
</tr>
</table>
Included a JSFiddle for it http://jsfiddle.net/4r2mg1rc/
The positioning of the inner elements always vary depend on the no of characters of the long desc.
Is there anyway to prevent this occurence so that the elements are not interdependent?
Though the question seems to be simple , i am looking for better ways to solve this problem which will definitely help me in my learning path.
Any suggestions , feedback are welcome.
Thanks for the help