I have a small piece of code that produce PrimeFaces dropdown List p:selectOneMenu
, and I cannot get all the IE to look the same. First of all, here is the code
<h:form id="myForm">
<h:panelGrid columns="3" columnClasses=",column,">
Select Food:
<p:selectOneMenu id="food" required="true" value="#{viewBean.selectedFood}">
<f:selectItem itemLabel="Select One" itemValue=""/>
<f:selectItems value="#{viewBean.foodList}"/>
<p:ajax update=":myForm:errorFood"/>
</p:selectOneMenu>
<p:message id="errorFood" for="food"/>
</h:panelGrid>
<p:commandButton value="submit" update="myForm"/>
</h:form>
In IE8, it look like below which is horrible. The drop down list is not align with the error message.
both IE6 and IE7 look great (with some variation but below is how I want it to look like)
I try to solve this problem but adding padding-top: 16px;
to the second column, which is the column that holding the drop down list, to make the drop down list align with the error message on IE8. Well this make IE8 look right, but make both IE6,7 not align any more. I try to use different doctype
like
<!DOCTYPE html>
or
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
or
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
but none work. If I dont use doctype
at all, then IE6,7,8, the drop down align with the error message, but since IE now in quirk mode
, causing more problems then it solves. Any solution please? BTW firefox always look great.