PDA

View Full Version : Panel: css for custom rounded corners box



webarts-pl
14 Sep 2010, 11:36 AM
Hi,
I have definied panel like this:

{
xtype: 'panel',
id: 'panel_general_info',
title: 'General information',
layout: 'auto',
html: 'Sample text goes here 123 :)'
}

I would like to define a custom CSS classes for my on rounded corner box.

I have found something like this:

function createBox(t, s){
return ['<div class="msg">',
'<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>',
'<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"><h3>', t, '</h3>', s, '</div></div></div>',
'<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>',
'</div>'].join('');

But how can I define/use a few css classes for a box where inside there's a content?

rjanos
14 Sep 2010, 12:28 PM
Did you try the cls attribute?



{
cls:'mycustomclass',
xtype: 'panel',
id: 'panel_general_info',
title: 'General information',
layout: 'auto',
html: 'Sample text goes here 123 '
}