Change position of p:growl

UI Components for JSF
Post Reply
ahoehma
Posts: 8
Joined: 11 Nov 2009, 10:30
Location: Leipzig
Contact:

11 Nov 2009, 17:18

How can I change the position of the growl-container?
The container id is "gritter-notice-wrapper" ... allways?
Where can I change the default css?

regards
Andreas
http://www.ahoehma.de

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

11 Nov 2009, 17:34

I think that should be a style class instead of a fixed id. I think we need to improve the skinning of growl.

For now you can do;

Code: Select all

<style type="text/css">
#gritter-notice-wrapper {
    top:20px;
    left:20px;
}
</style>
For example this places growl to the top left corner. Again, this will be improved to use style classes instead soon.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

11 Nov 2009, 17:39

You can monitor to changes by subscribing(voting);

http://code.google.com/p/primefaces/iss ... ail?id=316

User avatar
zorro6064
Posts: 59
Joined: 01 Mar 2011, 16:20

28 Apr 2011, 09:05

I need to locate growl in right and middle position
I use id but its position don't changed and is on the top left

Code: Select all

    <h:head>
        <title>Facelet Title</title>
        <style type="text/css">
           #growl {
                padding-left: 20px;
                padding-top: 20px;
            }
        </style>
    </h:head>
    <h:body>
         <p:growl id="growl" showDetail="true" sticky="true" />
        <h:form id="test">
            <p:panel header="Growl">
                <h:panelGrid columns="2">
                    <h:outputText value="Your Name: * " />
                    <p:inputText value="#{growl.test}" required="true" label="name" />
                </h:panelGrid>
                <p:commandButton value="Save" actionListener="#{growl.save}" update="growl" />
            </p:panel>
        </h:form>
    </h:body>
how can I fix this problem?
I use primefaces 3.0M1

Franke
Posts: 49
Joined: 12 Oct 2010, 08:41

28 Apr 2011, 11:03

You need to set the left/right and top/bottom properties, not padding.

.ui-growl {
right: 20px;
top: 50%;
}

would set all growl components at the right side and start halfway down the page. True vertical centralizing is abit harder.
Using PF 3.0 with default JSF implementation of JBoss 6

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 40 guests