我有一个带输入字段的JSF按钮:
<h:outputLabel for="rowsPerPage" value="Rows per page" />
<h:inputText id="rowsPerPage" value="#{AccountsController.rowsPerPage}" size="3" maxlength="3" style="border: 1px solid #006; height: 24px; border-radius: 3px 3px 3px 3px;" />
<h:commandButton styleClass="bimage" value="Set" action="#{AccountsController.pageFirst}" >
<f:ajax render="@form" execute="@form"></f:ajax>
</h:commandButton>
<h:message for="rowsPerPage" errorStyle="color: red;" />
如您所见,输入字段位于“设置”按钮下方。如何使用css在一行上创建按钮和输入字段。还有我如何使输入字段看起来像按钮?
编辑:这是html代码:
<input id="form:rowsPerPage" type="text" name="form:rowsPerPage" value="10" maxlength="3" size="3" style="border: 1px solid #006; height: 24px; border-radius: 3px 3px 3px 3px;" />
答案 0 :(得分:1)
尝试将margin-top: 1px
添加到按钮中。