8 Replies Latest reply: Aug 3, 2012 8:57 AM by Pete Mahon RSS

    Background color in a Region

    648034
      Hello all.

      I currently have 5 Regions on one page and would like to create visual queues by adding a background color to each region.

      Are there any examples available for me to implement something like this?

      Your guideance is very much appreciated

      Thanks
        • 1. Re: Background color in a Region
          438346
          If you want to change the background colour of the region then,

          Open region properties and put BGCOLOR="FF0000" in Region HTML table cell attributes property
          • 2. Re: Background color in a Region
            fac586
            >
            If you want to change the background colour of the region then,

            Open region properties and put BGCOLOR="FF0000" in Region HTML table cell attributes property
            >

            Ugh. Don't. <tt>bgcolor</tt> went out with the ark and it's not coming back. (And depending on region position, HTML table cell attributes might not be applied anyway.)
            I currently have 5 Regions on one page and would like to create visual queues by adding a background color to each region.
            In APEX the presentational aspects of an application are controlled using a combination of (X)HTML and CSS via themes and templates.

            The existing theme styling on the templates used by these regions will impact attempts to apply background colors to regions individually, so the necessary changes are likely to be theme and template dependent. Before giving any suggestions or examples we need to know:

            - APEX version
            - Web server architecture (EPG, OHS or APEX listener)
            - Browser(s) used
            - Theme used
            - Templates used
            - Region/Report/Process type

            and

            - Any idea what colors you intend to use?
            - Are there 5 different colors? Will this number ever change?
            - Is this required on only one page, or on several?
            • 3. Re: Background color in a Region
              648034
              Ok, thanks

              - APEX version - *3.1.2.00.02*
              - Web server architecture *(OHS)*
              - Browser - i.e 7
              - Theme - *15 - Light Blue*
              - Templates used -
              Page: One Level Tabs
              Region: Form Region
              Region: Reports Region
              Region: Breadcrumb Region
              Label: Optional Label with Help
              Button: Button
              Breadcrumb: Breadcrumbs

              - Region - *5*
              -Report - No reporting
              -Process type - DML - this page is a form that separates name, address, etc...

              and

              - Any idea what colors you intend to use? just Light Greys
              - Are there 5 different colors? No, Just a pattern of Light Grey and without. Will this number ever change? No
              - Is this required on only one page, or on several? Just one
              • 4. Re: Background color in a Region
                fac586
                For use on a single page the simplest approach is:

                <li>Add a unique static region ID to each region to be shaded, for example <tt>region-1</tt>, <tt>region-2</tt> etc (try to be more meaningful than this!).

                <li>Ensure the region templates used for each region use the <tt>#REGION_STATIC_ID#</tt> substitution string.

                <li>Create an internal style sheet in the page HTML Header, with the static region IDs used as ID selectors:
                <style type="text/css">
                #region-1, #region-2, #region-3, #region-4, #region-5 {
                  background: #ccc;
                }
                </style>
                • 5. Re: Background color in a Region
                  648034
                  Awesome, Thanks!!!
                  • 6. Re: Background color in a Region
                    cloaked
                    Hi fac586,

                    You mentioned...

                    *"Ensure the region templates used for each region use the #REGION_STATIC_ID# substitution string."*

                    How do I check this?

                    Thx, Tony
                    • 7. Re: Background color in a Region
                      Naushad Naleer
                      Find the template used for this region & go to that specific template, you will find it under Definition section.
                      • 8. Re: Background color in a Region
                        Pete Mahon
                        Naushad,

                        There is no need to respond to threads over 90 days old as the OP will not be notified.

                        Please read the FAQ - "After 90 days, inactive watches automatically expire".

                        Cheers, Pete