Getting title from a panel aligned:center without childs inherit.

  1. #1

    Getting title from a panel aligned:center without childs inherit.

    Hello,

    Question 1
    Is there a way to align the title text of a panel in the center. Without all the components nested in that panel inheriting that align-center.

    Tried the follow:

    - All nested components text-align:left is no option.
    - Modifying the general css file, but that will mean ALL panels will have that property and thats exacltly what i dont want.
    - StyleSpec="text-align:center" but that again all nested components inherit that property.

    Im looking for a way so i can adjust the text-align for getting the title in the middel for one specific panel. So the nested components stay untouched.


    Question 2
    There is something like BodyCls = so instead doing everything in a inline statement so i can do the css styling for that specified panel in a normale css file in a class or div.?
  2. #2

    RE: Getting title from a panel aligned:center without childs inherit.

    Hi,

    1. Set any Cls (for example, myCls) for panel and the following css rule
    .myCls .x-panel-header{text-align:center;}
    2. At this moment we have no BodyCls property (but it will be available in 1.0 version)
    You can add the following listener for panel
    <Render Handler="this.body.addClass('myClass');"/>
    or add any Cls for panel and add the following css rule
    .myCls .x-panel-body{required css attributes}
  3. #3

    RE: Getting title from a panel aligned:center without childs inherit.


    Thanks,

    Exactly what i needed works perfectly :)

Similar Threads

  1. Replies: 1
    Last Post: Oct 26, 2012, 8:52 AM
  2. Center a panel inside another panel
    By PAOLO in forum 1.x Help
    Replies: 0
    Last Post: Oct 03, 2011, 3:44 PM
  3. Replies: 1
    Last Post: May 18, 2010, 10:53 PM
  4. [CLOSED] [1.0] Checkbox Group not applying labelwidth for childs
    By webclouder in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 12, 2010, 12:11 PM
  5. Replies: 3
    Last Post: Sep 13, 2008, 10:09 AM

Posting Permissions