Spacing between JSF buttons

Asked

Viewed 1,254 times

0

I’m entering the JSF world and I’m trying to create a calculator but I’m not getting to leave the buttons out of space, they need to be together, someone knows how I fix this?

    <h:form>
            <h:panelGrid columns="4">
                <h:commandButton value="7" />
                <h:commandButton value="8" />
                <h:commandButton value="9" />
                <h:commandButton value="/" />
            </h:panelGrid>
        </h:form>

1 answer

2


Use the attributes cellpadding and cellspacing to remove spaces between cells:

<h:panelGrid columns="4" cellpadding="0" cellspacing="0">
        <h:commandButton value="7" />
        <h:commandButton value="8" />
        <h:commandButton value="9" />
        <h:commandButton value="/" />
</h:panelGrid>
  • Still shows the spaces.

  • Make sure you don’t have any css of your own by interfering with panelGrid css

Browser other questions tagged

You are not signed in. Login or sign up in order to post.