PDA

View Full Version : Style label to look like field set header



forumuser1080
8 Mar 2011, 3:14 PM
I could not get a fieldset with with a nested fieldset to size its width correctly (autoWidth: true). The page would render fine and size correctly in a small window, but if I made the window a little smaller I would get a horizontal scroll and noticed that the parent field set did not size down correctly.
Since I could not get this to work I got rid of the lower level field set but I would still like to have some separation between my items. I would like to add a label and style it like the header on a field set is styled.



{
xtype: 'label',
text: 'Set 1 Attributes',
cls: 'x-fieldset-header x-unselectable'
}


Any ideas why that is not working?

Also anyone have comment on nested fieldsets, not sure why the autoWidth: true was not working.

forumuser1080
9 Mar 2011, 10:49 AM
Played around more today and I still cannot get Labels to style like I want using the cls attribute. I am sure I am doing things all wrong. Any ideas.

forumuser1080
9 Mar 2011, 5:03 PM
Ok I got this to work but it is not dynamically based on my extjs theme. If I change the theme the color will most likely be wrong. I copied the style from x-fieldset legend. Can I find this in some other extjs css file(s) so that I can reference the color and font there rather than hard code it in my own css file?



.form-section-label {
color: #15428B;
font: bold 11px tahoma,arial,helvetica,sans-serif;
}




{
xtype: 'label',
text: 'Child Fields',
cls: 'form-section-label'
{