[CLOSED] How to set Panel background color?

  1. #1

    [CLOSED] How to set Panel background color?

    Hey!

    I have tried the following (in code-behind) to set a panels background color.

    Alt 1:

    PanelComment.Cls = "background-color: yellow;"
    Alt 2:

    PanelComment.Cls = "background: yellow;"
    Alt 3:

    In markup:
    <style type="text/css">
       .yellowColor {
            background: #CCFFCC;
        }
    </style>
    In code-behind:
    PanelComment.AddClass("yellowColor");
    None has worked. What am I missing?
    Last edited by geoffrey.mcgill; May 14, 2011 at 6:49 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please use .BodyCls or .BodyStyle.

    Value of .BodyCls (and another "...Cls" properties) must be a css class name, not css rule.
    Value of .BodyStyle (and another "...Style" properties) must be a css rule.
  3. #3
    Thanks, that did it =) Solved.

Similar Threads

  1. Replies: 0
    Last Post: Sep 27, 2011, 10:24 AM
  2. [CLOSED] Background color toolbar
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 14, 2011, 11:33 AM
  3. panel background color
    By unaltro2 in forum 1.x Help
    Replies: 2
    Last Post: Jan 10, 2011, 2:30 PM
  4. [CLOSED] [1.0] gridpanel set row's background-color
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 10, 2010, 12:37 PM
  5. Change Tab background color or background image
    By georgelanes in forum 1.x Help
    Replies: 0
    Last Post: Nov 06, 2008, 3:55 PM

Tags for this Thread

Posting Permissions