Problems with the positioning of the primefaces dialog

Asked

Viewed 61 times

0

I wanted to know a way to position my dialog at a certain distance from the left side of the screen.

<p:dialog id="dialogAcesso" showHeader="false" visible="true" width="500" position="left">



            <div align="center">
                <h:panelGrid columns="2" cellpadding="7">                        
                    <h:commandButton type="submit" id="Enviar" value="Enviar" action="#{servidorMB.alterarUsuario()}" style="border-width:0px; text-align: center; border-radius: 5px; height: 29px; width: 70px;  background: #427BCA; color: #ffffff"/>
                    <h:commandButton type="submit" id="voltar" value="Voltar" action="#{servidorMB.alterarUsuario()}" style="border-width:0px; text-align: center; border-radius: 5px; height: 29px; width: 70px;  background: #427BCA; color: #ffffff"/>
                </h:panelGrid>
            </div>
            <p:spacer width="100" height="15" />
        </p:dialog>

The position="left" just glue it on the left side but wanted a certain distance from the left corner as I do ?

  • Put in CSS margin-left:20px for example

  • I was able to solve the problem with the tag position="x,y"

  • Consider if "auto reply" putting the solution with details to help those who fall there looking for an answer :D

1 answer

0


Solve the problem by configuring the tag position

For example:

 <p:dialog id="dialogAcesso" showHeader="false" visible="true" width="500" height="400" position="230,130" >

Browser other questions tagged

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