12 Replies Latest reply: Dec 13, 2010 2:19 PM by 691822 RSS

    Central region

    691822
      Hi,

      I have one region in a page and want that region to be in the center of the page horizontally, I have tried to use the align and style float but didn't work.

      is there any way I can align this region in the middle of the page, I'm using APEX 4.0.1, theme 2 and One Level Tabs - Right Sidebar (fixed-width / DIV based) template for this home page.

      Thanks,
        • 1. Re: Central region
          Jaydip Bosamiya
          Hi,

          can u post HTML and CSS code?

          Thanks,
          Jaydip Bosamiya
          • 2. Re: Central region
            691822
            Hi,

            I just copied the body template, let me know if you have a solution.

            Thanks.

            <div id="header">
            <div id="logo">#LOGO##REGION_POSITION_06#</div>
            #REGION_POSITION_07#
            <div id="navbar">
            #NAVIGATION_BAR#
            <div class="app-user">#WELCOME_USER#</div>
            #REGION_POSITION_08#
            </div>
            </div>
            <div id="tabs">
            <div class="frame">
            <div class="bg">
            <div class="tab-holder">
            #TAB_CELLS#
            </div>
            </div>
            </div>
            </div>
            <div id="topbar">#REGION_POSITION_01##REGION_POSITION_04#</div>
            <div id="messages">#SUCCESS_MESSAGE##NOTIFICATION_MESSAGE##GLOBAL_NOTIFICATION#</div>
            <div id="body">
            <div id="two-col">
            <div id="sidebar">#REGION_POSITION_03#</div>
            <div id="main">#REGION_POSITION_02##BOX_BODY#</div>
            </div>
            </div>
            • 3. Re: Central region
              691822
              Hi,

              I just copied the body template, let me know if you have a solution.

              Thanks.

              <div id="header">
              <div id="logo">#LOGO##REGION_POSITION_06#</div>
              #REGION_POSITION_07#
              <div id="navbar">
              #NAVIGATION_BAR#
              <div class="app-user">#WELCOME_USER#</div>
              #REGION_POSITION_08#
              </div>
              </div>
              <div id="tabs">
              <div class="frame">
              <div class="bg">
              <div class="tab-holder">
              #TAB_CELLS#
              </div>
              </div>
              </div>
              </div>
              <div id="topbar">#REGION_POSITION_01##REGION_POSITION_04#</div>
              <div id="messages">#SUCCESS_MESSAGE##NOTIFICATION_MESSAGE##GLOBAL_NOTIFICATION#</div>
              <div id="body">
              <div id="two-col">
              <div id="sidebar">#REGION_POSITION_03#</div>
              <div id="main">#REGION_POSITION_02##BOX_BODY#</div>
              </div>
              </div>
              • 4. Re: Central region
                691822
                It seems does not allow me to paste the whole message.
                • 5. Re: Central region
                  fac586
                  I'm using APEX 4.0.1, theme 2 and One Level Tabs - Right Sidebar (fixed-width / DIV based) template for this home page.
                  What is the region type and template?

                  The basic approach required is to use CSS to set the left/right margins of the region to <tt>auto</tt>, but it may be necessary to override existing styling on the region, or apply an explicit width, which will depend on the region and template.
                  • 6. Re: Central region
                    691822
                    I use HTML region (no template), the display point in Page Template Body (1).

                    Could you please tell more detail how to align it in the middle of the page.

                    Thanks,
                    • 7. Re: Central region
                      fac586
                      I use HTML region (no template)
                      OK, No Template complicates matters. Are you able to post the content of the HTML region?
                      • 8. Re: Central region
                        691822
                        The HTML region has nothing, I created this empty html region to be parent for many child regions so i can group them in one region then play with the parent region.

                        Please let me know if you need more info so you can give me a solution.

                        Thanks,
                        • 9. Re: Central region
                          fac586
                          The HTML region has nothing, I created this empty html region to be parent for many child regions so i can group them in one region then play with the parent region.
                          What kind of child regions? For one reason or another, most of them by default will have a width of 100%, so centering of a container region will have minimal effect. To see any appreciable effect it will be necessary to set or override the width on each of the subregions. Is it intended that all of the subregions should have the same width?

                          You'd be recommended to create an example app on apex.oracle.com to experiment with.
                          • 10. Re: Central region
                            691822
                            Child Regions are reports same width, but still not 100%, the center position will sure have affect. I think there should be away to put the parent in the center.

                            I thought should be easy one, any normal web framework can do it, why not apex?
                            • 11. Re: Central region
                              fac586
                              Make the container region templare Region without Buttons and Titles rather than No Template.

                              Set the Region Attributes property to
                              style="margin-left: auto; margin-right: auto;"
                              • 12. Re: Central region
                                691822
                                Thanks for that but didn't work. Do you have other suggestion?