This discussion is archived
8 Replies Latest reply: May 28, 2013 11:07 AM by leckj RSS

Putting colors in my application. Dont know HTML

leckj Newbie
Currently Being Moderated
Hi,

My application needs livening up a bit, the Productivity theme is ok,but I need to put a few colors in there.
I have very little knowledge of HTML right now(but I'm trying).

I would like to know how to change a few attributes of a region or form such as the color,background color,
maybe font and text color as well, by making an entry in the Region attributes of regions,
or Column formatting of reports.

I need to target only one or 2 regions,and leave the theme settings for others.

Nothing complicated,even just the color and background color will do.


Thanks

Leckraj
  • 1. Re: Putting colors in my application. Dont know HTML
    TexasApexDeveloper Guru
    Currently Being Moderated
    NOT HTML.. CSS.. You use Style sheets to customize the color and such for regions....

    Before you start trying to color up your application, you should brush up on HTML & CSS for your general development skills..

    Thank you,

    Tony Miller
    Ruckersville, VA
  • 2. Re: Putting colors in my application. Dont know HTML
    chiti Newbie
    Currently Being Moderated
    Hi Lecki,

    I too don't have great knowledge but try the below scripts

    If you want to change the background color at page level add the below script in Page HTML Header Attribute
    <style type="text/css">
    body {background-color:colorname}
    </style>
    for region level add the below tag in the region source
    <body style="background-color:colorname">
    But as Tony said it is better to understand HTML and CSS if you want to enhance the page or region.

    Thanks
    Thevar

    Edited by: Thevaraj on May 24, 2013 7:22 AM
  • 3. Re: Putting colors in my application. Dont know HTML
    leckj Newbie
    Currently Being Moderated
    Hi,

    Thanks for your replies,

    I thought it was possible just to enter something in the Region Attribute section of the Region and this would overwrite
    whatever was in the style sheet for that feature whether it is colour,background colour or font etc.

    The suggestion about background colors is too drastic,it seems to paint the whole page.

    Thats ok though,I see that the packaged samples in APEX have style sheets,I'll just try to understand how it works.

    Thanks

    Leckraj
  • 4. Re: Putting colors in my application. Dont know HTML
    fac586 Guru
    Currently Being Moderated
    Thevaraj wrote:
    Hi Lecki,

    I too don't have great knowledge
    It shows.
    for region level add the below tag in the region source
    <body style="background-color:colorname">
    This is completely invalid when used in the region source. An HTML page contains one and only one <tt>body</tt> element, and in APEX that is included via the page template.
    But as Tony said it is better to understand HTML and CSS if you want to enhance the page or region.
    Indeed.
  • 5. Re: Putting colors in my application. Dont know HTML
    fac586 Guru
    Currently Being Moderated
    >
    The suggestion about background colors is too drastic,it seems to paint the whole page.
    Drastic and very, very wrong. Please ignore.
  • 6. Re: Putting colors in my application. Dont know HTML
    leckj Newbie
    Currently Being Moderated
    Hello,

    I've started to try understanding at least the basics of CSS,and the simpler parts of a style sheet are now clearer.

    However I thought there were "hooks" to get in the theme template, and change things by maybe a substitution string
    or something. For example I learned (from this OTN) that the background color of a checked row in a standard report can be changed
    by going into the theme's template.

    I have a conditional region that displays only when errors occur during after a page is submitted. It gathers all the errors
    in one place and guides the user on how to correct them. It works as planned.

    I only want to display the "title bar", where the region name is displayed, in red. That's it. Is this possible without getting
    into the CSS details?

    Thanks.

    Leckraj
  • 7. Re: Putting colors in my application. Dont know HTML
    fac586 Guru
    Currently Being Moderated
    leckj wrote:
    Hello,

    I've started to try understanding at least the basics of CSS,and the simpler parts of a style sheet are now clearer.

    However I thought there were "hooks" to get in the theme template, and change things by maybe a substitution string
    or something. For example I learned (from this OTN) that the background color of a checked row in a standard report can be changed
    by going into the theme's template.
    That is one of very few declarative appearance settings in APEX&mdash;and it is now being superseded by pure CSS/jQuery alternatives in the latest themes.

    When we make reference to "hooks" we are usually talking about HTML elements and attributes that can be used in CSS and jQuery selectors&mdash;typically <tt>id</tt> attributes specified using static region IDs to uniquely identify a region, and <tt>class</tt> attributes specified in template HTML definitions to select multiple elements. Typically, these ID and class "hooks" will be used as the first level in descendant selectors that enable us to target specific elements within APEX components.

    This is why we place such emphasis on knowing which APEX version, theme and templates are being used. If you don't provide this information in your posts or in an example on apex.oracle.com then we can't begin to determine which selectors to use to provide the required presentation, or the best place in APEX to locate the CSS.
    I have a conditional region that displays only when errors occur during after a page is submitted. It gathers all the errors
    in one place and guides the user on how to correct them. It works as planned.

    I only want to display the "title bar", where the region name is displayed, in red. That's it. Is this possible without getting
    into the CSS details?
    No, you will have to use CSS somewhere to specify the required colour scheme (and very possibly to override the default theme presentation). Best practice is also to follow the principle of separation of concerns and create a style sheet that is separate from the template and your content.
  • 8. Re: Putting colors in my application. Dont know HTML
    leckj Newbie
    Currently Being Moderated
    Well, I think that the APEX team should make an effort to make this wonderful product's display interface more accessible to non-web developers like myself.

    Coming from a Forms6i background to this environment is hard enough, and I accept that I need to learn Javascript and jQuery (which seems amazingly concise),
    because these are the tools of the trade.

    But Apex is also aimed at PL/SQL developers who want to use their PL/SQL and SQL skills to develop web applications while being "shielded" from HTML,CSS and the
    like as far as possible. Of course we need to know the basics,that is understandable,but having to delve into the template's style sheets to make a small change
    such as painting a region header red is asking too much.

    What is needed is a few pages of reports,forms etc that have had the theme's defaults overriden in various ways , so that we can look at how it's done and apply them.

    Now I know that the div for the region I am working on is <div class="uRegionHeading"> and probably the container where the buttons are placed is uButtonContainer.

    But I am no nearer to knowing how to color them. I hope that APEX 5 will make more of the display features available as declaratives,if possible.

    But just a small rant though,compared to being able to use PL/SQL in a web application,which is great.

    Regards

    Leckraj

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points