i have a
JSP code with label and input fields in a DIV tag and its associated CSS.
The alignment of these fields look good in IE9+ but not in IE7.
left div is little above and right div pretty lower. We have to support the lower IE versions too.
JSP code:
<form:form...>
<DIV class="outer-left-bm">Location: </DIV><DIV class="outer-right-bm"><form:select path="location" items="${locationList}" itemValue="code" itemLabel="desc" /></DIV>
<DIV class="outer-left-bm">Name: </DIV><DIV class="outer-right-bm"><form:input path="Name" maxlength="20" size="20" /></DIV>
</form:form>
CSS :
DIV.outer-left-bm {
width:50%;
float: left;
border: 1px;
text-align: right;
margin-bottom: 8px;
}
DIV.outer-right-bm {
width: 50%;
float: right;
border: 1px;
text-align: left;
margin-bottom: 8px;
}
Tried clear:both in the DIV but doesnt work for all fields.
Any help is appreciated.