Center align page

All,

I want to display an image and a box one under the other in the center of the page. Although I have accomplished in the following way, I fell is not correct when the screen resolution changes that will not be in the Center. Please advice
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <f:view beforePhase="#{loginBean.onloadPhaseListener}">
    <af:document id="d1" title="Login">
        <af:messages id="m1"/>
        <af:form id="f1" defaultCommand="cb1">
        <af:popup id="p1" binding="#{loginBean.termsConditionpopup}">
          <af:dialog id="d2" type="ok">
            <af:panelHeader text="Online Quotation" id="ph3">
              <f:facet name="context"/>
              <f:facet name="menuBar"/>
              <f:facet name="toolbar"/>
              <f:facet name="legend"/>
              <f:facet name="info"/>
              <af:panelBox text="Terms &amp; Condition" id="pb2" showDisclosure="false">
                <f:facet name="toolbar"/>
                 
              </af:panelBox>
            </af:panelHeader>
          </af:dialog>
        </af:popup>
        <af:panelStretchLayout id="psl1" topHeight="115px" startWidth="264px"
                               endWidth="173px">
            <f:facet name="bottom"/>
            <f:facet name="center">
              <af:panelGroupLayout layout="scroll"
                                   xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                   id="pgl6">
              <af:image source="/com/ui/image/logo.png" id="i1"
                        inlineStyle="width:873px;"/>
              <af:spacer width="10" height="20" id="s5"/>
              <af:panelGroupLayout id="pgl4" halign="center"
                                   inlineStyle="margin:70.0px;"
                                   layout="horizontal">
                <af:spacer width="130" height="0" id="s6"/>
                <af:panelBox text="Login" id="pb1" showDisclosure="false"
                             inlineStyle="width:335px;" background="light">
                  <f:facet name="toolbar"/>
                  <af:panelGroupLayout layout="scroll"
                                       xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                       id="pgl1" halign="center">
                    <af:panelFormLayout id="pfl1">
                      <af:inputText value="#{bindings.DealerId.inputValue}"
                                    label="#{bindings.DealerId.hints.label}"
                                    required="#{bindings.DealerId.hints.mandatory}"
                                    columns="#{bindings.DealerId.hints.displayWidth}"
                                    maximumLength="#{bindings.DealerId.hints.precision}"
                                    shortDesc="#{bindings.DealerId.hints.tooltip}"
                                    id="it1" contentStyle="text-align:left;"
                                    autoSubmit="false" immediate="false">
                        <f:validator binding="#{bindings.DealerId.validator}"/>
                        <af:convertNumber groupingUsed="false"
                                          pattern="#{bindings.DealerId.format}"/>
                      </af:inputText>
                      <af:inputText value="#{bindings.Password.inputValue}"
                                    label="#{bindings.Password.hints.label}"
                                    columns="#{bindings.Password.hints.displayWidth}"
                                    maximumLength="#{bindings.Password.hints.precision}"
                                    shortDesc="#{bindings.Password.hints.tooltip}"
                                    id="it2" required="true" secret="true"
                                    autoSubmit="false" immediate="false">
                        <f:validator binding="#{bindings.Password.validator}"/>
                      </af:inputText>
                    </af:panelFormLayout>
                    <af:spacer width="10" height="10" id="s1"/>
                    <af:panelGroupLayout id="pgl2">
                      <af:commandButton text="Login" id="cb1"
                                        inlineStyle="height:20.0px;"
                                        action="#{loginBean.doLogin}"/>
                    </af:panelGroupLayout>
                    <af:spacer width="10" height="10" id="s7"/>
                    <af:commandLink text="Terms &amp; Condition" id="cl1"
                                    partialSubmit="true" immediate="true">
                      <af:showPopupBehavior popupId="p1" triggerType="action"/>
                    </af:commandLink>
                  </af:panelGroupLayout>
                </af:panelBox>
              </af:panelGroupLayout>
            </af:panelGroupLayout>
            </f:facet>
            <f:facet name="start">
            <af:spacer width="20" height="10" id="s3"/>
          </f:facet>
            <f:facet name="end">
            <af:spacer width="20" height="10" id="s4"/>
          </f:facet>
            <f:facet name="top">
              <af:panelGroupLayout layout="scroll"
                                   xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                   id="pgl3">
                <af:spacer width="10" height="50" id="s2"/>
              </af:panelGroupLayout>
            </f:facet>
          </af:panelStretchLayout>
        </af:form>
    </af:document>
  </f:view>
</jsp:root>
thnks
11.1.1.5 Jdev

Here is an example based on your use cases:






**








Tags: Java

Similar Questions

  • HP solution center and alignment page

    Hello

    I tried to learn how to fix my printer in your video

    http://WWW8.HP.com/h20621/video-gallery/us/en/customer-care/printers-and-all-in-ones/print-a-DIAGNOS...

    The problem I have is that the printer prints all this trouble, and return to me the message "place the alignment on scanner page and press OK.

    But the video was told to open a mysterious "HP Solution Center" which tells me that it won't open because I don't have a HP device!

    How absurd...

    Now I have two problems, no Solution Center or alignment Page... actually three, because I have a HP printer that doesn't work too

    Cant believe it!

    Please provide a screenshot of your control panel. Anything in red, you need to delete off your computer:

    Once this operation is finished, continue to follow this HP document always above.

    Your Solution Center shows that you don't have a connected device, then Yes, you have to go through all that in order to print an alignment sheet. You have two question right now I'm provides steps to set. You cannot print an alignment sheet immediately your printer, you need to use the Solution Center.

  • Photosmart B110c 'Now print alignment page' appears to never.

    Issues related to the:

    How to exit display forever now 'print alignment page?

    How to solve the problem of failure Scanner?

    1. I changed the print head,

    2. I replaced the black ink with authentic cartridge, the yellow ink with compatible cartridge.

    3. After power off, Power ON, appears on the printer: failure of the Scanner, then alignment recommendation and finally 'now print alignment page' and appears to never.

    4. the Solution Center on the computer displays the image below.

    5. from printer Toolbox (in the settings): I could not align the print head, because the failure of scan.

    6. After you clean the print heads and print a Diagnostic Page, I printed the following attachments despite the printer on the SCREEN continues to display the text "now print alignment page":

    7. in spite of the yellow ink level is OK, the yellow is not printed on the page_2 attachment hardware of the printer.

    Please advise to fix the unit.

    Hello

    HP has no guarantee that 3rd party supplies will work in our printers. Looking at the Diagnostics pages it seems that you are not printing cyan or yellow. There are steps you can take to try to retrieve not being able to print individual colors. Please see this link:

    http://support.HP.com/us-en/document/c02045945

    If you cannot print all colors, you run into a problem to scan the alignment page. I think that the question of printing color must be cleared before attempting to align again. How to perform an alignment, please visit this link: http://support.hp.com/us-en/document/c02045945

  • Alignment page prints of poor quality and fails the test on 4500 G510n alignment

    Windows 7 installed new color and cartridges b & W.

    Open Hp Solution Center - cartridge to align the State indicated

    Cartridge to align selected and a page prints.

    Poor quality. only 3 small red arrows at the top and 4 rows of blue rectangles on background.

    Place this page in reverse on the press and the OK scanner glass.

    Scan the product and the message on the window of the printer "alignment Page not detected."

    Error message in the solution Center "alignment failed".

    I tried several times to cleaning cartridges. Tried the alignment several times page reprint. The same problem.

    Hello Sugarlew,

    It can be several things, the origin of the problem you are experiencing. Here is the troubleshooting article that solves the problem you are experiencing. One of the steps should help resolve the problem.

    A "alignment page not detected ' or"Alignment failed"Error Message is displayed on the control panel"

  • Stop 6000 E609n print alignment PAGE. When turned on. Tried alignment of the control panel.

    Whenever I turn on the Officejet 6000 E609n wireless printer prints an alignment page.  How can I stop this?

    I tried aligning the printhead from the control panel and that does not stop the problem.   After that, I thought I'd try the box alignment tools of the printer but could not find it.   When I tried to go to the HP Solution Center, all I could get were geographical locations.  Also did not try the third method to align the print properties.

    From the center of solution... Follow the same steps to print a clean printhead... but this time to print a quality report...

  • Center Align a text form field

    I'm try to center align a form text field in adobe acrobat pro but when I click on "align, distribute or Center ' only Center vertically, horizontally, or both are clickable but who is focus the entire field on the page rather than just the text inside. How can I get the text to center align horizontally in the text field?

    In form editing mode, right-click the field, and then select Properties - Options.

    This is the first field 'alignment.

    The game, June 4, 2015 23:21, nicoleh37243621 [email protected]>

  • How do I Center the page Split and Design mode?

    When I look at my model in Design or split mode, it is flush on my screen with a top margin of 20 px or more. But when I check it in Live View mode, or when he seen on Firefox/Safari/Chrome/Opera, it is centered and aligned against the top of the screen.

    I should add that the model was very much in the design and split, until I started clearing the menu a spry. My page has fallen apart, I deleted the spry with plans to start ot on. But then I discovered my model right flower (in the design and Split, in any case).

    Can someone tell me please how to fix this? I guess that's more annoying than a tragedy, as long as the page is centered when he goes online. But it's a nuisance to work on the right side of the screen.

    The following encoding:

    * {
    margin-top: 0px;
    left margin: 0px;
    }

    {#wrapper}
    background-image: url (.. / template%20images/mainBody.jpg);
    background-repeat: repeat;
    overflow: hidden;
    Width: 800px;
    background-color: #CCC;
    margin-right: auto;
    left margin: auto;
    }
    #wrapper #header {}
    height: 150px;
    Width: 800px;
    background-color: #CCC;
    background-image: url (.. / template%20images/header.jpg);
    }
    {#wrapper #navBar}
    height: 55px;
    Width: 800px;
    background-color: #666;
    background-image: url (.. / template%20images/navBar.jpg);
    }
    {#wrapper #mainBody}
    Width: 80%;
    margin: 0 auto;
    padding-top: 20px;
    do-family: Arial, Helvetica, without serif.

    }
    #wrapper #footer {}
    background-image: url (.. / template%20images/footer.jpg);
    Width: 800px;
    height: 60px banner;
    text-align: center;
    font size: 16pt;
    Clear: both;
    }

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
    " < html xmlns =" http://www.w3.org/1999/xhtml ">
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; Charset = UTF-8 "/ >"
    <!-TemplateBeginEditable name = "doctitle"-->
    2000_template < title > < /title >
    <! - TemplateEndEditable - >
    "" < link href = "... / Layout.CSS" rel = "stylesheet" type = "text/css" / >
    < style type = "text/css" >
    <!--
    ->
    < / style >

    < / head >

    < body >
    < div id = 'wrapper' >
    < div id = "header" >

    < / div > <!-close header->

    < div id = "navBar" >

    < / div > <! - close the navigation bar - >
    < div id = "mainBody" > <! - begin mainBody - > <!-TemplateBeginEditable name = "mainContent"-> value

    < p > Lorem ipsum dolor sit amet, adipiscing elit computer. Etiam dolor libero, aliquam vitae in city, malesuada non neque. < /p >

    < p > Phasellus dignissim arcu eget posuere vel varius total magna dapibus. Phasellus pharetra imperdiet nunc vel fermentum dolor id interdum. Integer luctus mollis tempor. Nunc urna, blandit at, ultrices and erat sollicitudin cursus lacus. Lectus sed ipsum vitae dictum city, diam, euismod augue, an aliquet felis massa ut nibh augue. < /p >

    < p > ac ante Sed magna. Nulla ullamcorper posuere MPCs. In interdum elit sed tempor so, mauris justo, lobortis sem sed egestas quam magna a mi Etiam tincidunt fringilla sapien congue condimentum adipiscing ut augue. Nam pretium egestas lacus in elementum. Vivamus eros erat, varius nec, aliquam quis congue orci. < /p >

    < p > Vivamus eget felis purus, in porta tellus. Nullam ac orci had luctus ornare arcu. Aliquam quis ligula metus. Morbi congue cursus justo, and restore sem adipiscing blandit. < /p >

    < p > amongst bibendum sed nisi. Curabitur imperdiet lacus in ullamcorper ultrices. Etiam pulvinar magna and EU aliquam metus semper congue neque. < /p >

    <! - TemplateEndEditable - > < / div >
    <! – close the main body - >
    < div id = "footer" > <!-TemplateBeginEditable name = "footerPage"->
    < p > & #8249; & #8249; Previous 1: 2: 3: 4 continue & #8250; & #8250; < /p >
    <! - TemplateEndEditable - > < / div > <! - close footer - >
    < / div > <! - close wrapper - >
    < / body >
    < / html >

    Get rid of it.

    * {
    margin-top: 0px;
    left margin: 0px;
    }

    The universal selector (asterisk) apply whatever styles give you to EACH ELEMENT on the PAGE anywhere.  So unless you know exactly what you are doing, do not use universal selectors.

    To Center your page

    {body

    Width: 900px / * some width in pixels, ems or %}

    Auto margin: 0;

    }

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • PREVIEW IN BROWSER - QUESTION OF ALIGNMENT PAGE

    Dear all,

    I'm fairly new to Fireworks CS4 and we get great results with it, but when we saw prototypes of site in a browser (Safari in this case) the default page alignment is to the left n the browser.

    I would really like to pages center aligned, I messed up with the alignment settings in the HTML Setup dialog box, by setting the alignment of the page towards the 'centre', but when you preview pages still line up on the left side I've got the browser.

    So my questio is:-is there a way to force page Align Center in a browser when previewing of pages in Fireworks?

    Any help or advice would be greatly appreciated, and my apologies if the answer is look at me and I completely missed it!

    See you soon

    This tutorial can help.

    http://www.Adobe.com/devnet/Fireworks/articles/fw_html_styles.html

    Jim Babbage

  • Center a page in a browser window.

    A friend called me this weekend, wondering how to get a page to Center in a browser window. I was caught off guard and told him that I have to remind him (with Dreamweaver or HTML work is not on a daily basis can cause the simplest things become fogged or lost). The best I could say of one of my books of Dreamweaver is that you need to set all margins to zero in the property inspector. This should ensure that all the areas around the page are equal.

    I want to assure you while I come here looking for the final answer. I was OK with the margins to zero response?

    Thank you

    Ken

    This gets asked a lot.  You really only need 3 things to Center a page.

    (1) a document type declaration invalid at the top of your page.  DW does for you when you open a new HTML document.

    (2) a width of container declared in pixels, ems, or percentages.

    (3) margin-left and margin-right, set to auto.

    CSS code:

    #container {}

    Width: 900px;

    margin: 0 auto; / * This centres container in modern browsers * /.

    text-align: center; / * This centres container in old browsers * /.

    }

    HTML code:

    Insert the contents of your page here

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    www.Alt-Web.com/
    www.Twitter.com/ALTWEB
    www.Alt-Web.blogspot.com

  • How to automatically center the page in the browser window

    Somewhere along the way, I remember coming across a very simple way to automatically focus your web pages in the browser.  Could someone remind me how it's done.  I think it's an order in one step among the toolbars, located along the upper part of Dreamweaver, but I looked through them and can't find it.  I also tried application center alignment my wrapper div that holds all my content, but who did not do.

    Thank you.

    {#wrapper}
    background: #AEADB2;
    padding: 0px;
    height: 660px;
    Width: 960px;
    position: absolute;
    z-index: 2;
    Auto margin: 0;
    border-style: none;
    Top: 0px;
    text-align: left;
    }

    Thanks again for your help.

    I didn't know you were in the position: absolute on the wrapper div - that is why it is always best to ask for a link - which I did not in this case :-)

    position: absolute;

    For the wrapper div, change this:

    position: relative;

    and it must be centered - he did when I edited the css in Firefox :-)

  • Alignment Page HP PSC1315 prints every time the printer is turned on

    It's VERY frustrating.  After installing a printer driver updated to my new Win7 system and installation new black ink cartridge in the printer dang prints the alignment Page, whenever I turn it on!  I have "lined up" it several times and yet HP insists to waste my (money for waste of ink and paper) green, even though I followed the software and the instructions on the page to test several times!  Help!  It is rather ironic, given my brand new printing software (wow that download was enormous: no doubt inflate more software) has a button how to be green at the top right!

    I've been a supporter of long standing of HP that buying the products of your printer for many years, but unless this is resolved soon, I'll go out and spend double what price this printer and return the money to your Kumite.  This is intolerable!  I do not think that your software help consider even this oversight, oh, but I see that I can click on a convenient button HP purchase!  Furthermore, I'm not some neophyte with computers, I built this pc and many others before it.

    signed... Frustrated!

    Hello

    Have you tried that?

    1 turn the printer off and wait ten seconds. Turn it back on.

    2. let the printer print test page.

    3. when the test page prints, unplug the USB cable that connects to the printer to your computer. Not turn off the printer and unplug the cable.

    4. place the test page to the glass of the scanner and press the SCAN button on the printer control panel. The indicator light flashes while the page is being analyzed.

    5 remove the test page when the indicator light stops flashing.

    6. turn the printer off and wait another ten seconds.  Now you can turn it back on it.

    It is no longer printing test pages?

    Now, you can reconnect the USB between PC and the printer cable.

    Please post your results.

    Kind regards
    ERICO

  • OfficeJet 4615: Officejet 4615 stuck on "Print alignment Page" during the initial installation

    sharpen the printer begins to print page alagin and stuck

    the printer, printing from the computer

    I update the firmware and I do hardreset

    Hello @menybiton ,

    Welcome to the forums of HP.

    I understand that your printer is stuck on the print alignment page.

    I want to help you.

    I would like to remove the ink cartridges.

    Then another hard reset of preforms.

    When the printer asks the missing cartridges, reinstall them.

  • OfficeJet 4650: OfficeJet 4650 alignment page questions

    I am registered at instant ink, and I recently replaced my original cartridges with the new ink instant ones. When the alignment page is printed, it misses what looks like all the other black lines. When I scan to complete alignment, it says that the print quality is set by default, and I don't get an error code saying that something is wrong.

    I have tried to clean the ink cartridges, remove and reinstall the cartridges and running the alignment again, but I still get the missing lines. I may be defective and an instant black ink cartridge?

    Welcome to the HP Forums @Persnipety

    I came across your post about the problem you are having and I wanted to respond to help with my suggestions. Please see the guide below to resolve this issue. If the problem persists after resolution of the problem, please try to call the hotline to discuss replacing the printer or the rating of. I'll include contact info HP below to directly reach.

    Solving print quality problems

    Please click the "accept as Solution" if we reached a solution and the "thumbs up" to say thank you for my help.

    Contact HP:
    Step 1. Open the link: www.hp.com/contacthp/
    Step 2. Enter the product number or select Auto detection
    Step 3. Scroll up to "still need help? Fill out the form to select your contact options.
    Step 4. Scroll down and click on: contact HP options - click Get phone number
    File number and phone number appear

  • K5400 prints the alignment page after each document

    I have a HP Officejet Pro K5400, which insists on an alignment page printing after each document.

    It's on Windows XP Pro SP3, if that makes a difference!

    I've tried everything I can think of to clarify this, but he persists.

    I know it's the printer, I moved and installed on another PC, and the error moves with the printer!

    Can someone tell me how to stop this, as HP don't seem to know!

    Message edited by JimW on 22/12/2008 08:26

    Excellent!

    Installation of new heads, (both for security), sorted!

  • My HP Envey 5530 is stuck on "scanning alignment page.

    My hp Envy 5530 is stuck on "scanning alignment page" and did not finish the alignment.

    Hello frustrated1963,

    Welcome to the HP Forums!

    I understand your desire to 5530 is stuck on now 'scanning alignment Page. I will do my best to help you! Please, try the following steps:

    (1) Please plug this printer into a live wall, not a surge protector

    (2) take away all your ink cartridges

    (3) disconnect the power cable from the back of the printer (do not press the power button)

    (4) wait 60 seconds or more

    (5) plug the power cord into the printer. Wait for the printer turn on completely

    (6) now install the ink cartridges. Try to print an alignment page

    Please let me know if this page receives missing colors. Impatience on your part.

Maybe you are looking for