0

I have a JSF button with input field:

enter image description here

<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>&nbsp;
<h:message for="rowsPerPage" errorStyle="color: red;" />

As you can see the input field is below the "set" button. How can I make the button and the input field on one line with css. And also how I can make the input field look like the button?

EDIT: This is the html code:

<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;" />
2
  • If your question relates specifically to css/html, please post the rendered html from the browser. If it relates to the JSF code, please add the JSF tag to your question. Commented Sep 20, 2012 at 16:52
  • Try adding a 1px border to commandButton as well Commented Sep 20, 2012 at 17:15

1 Answer 1

1

Try adding margin-top: 1px to your button.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.