PDA

View Full Version : [SOLVED] How can I change the style of a label or field?



kkitamura
18 Feb 2012, 11:41 PM
I think to use fieldStyle or labelStyle,
but I don't know how to set them.
Please teach me the detailed setting method.

kkitamura
19 Feb 2012, 3:13 AM
The method was found!

What was necessary was just to only have set to fieldStyle or labelStyle with "background-color:red;font-size:18px".

That's all!

aconran
20 Feb 2012, 7:34 AM
That's one way to do it or you could also add an additional css class to the field and then style it via css.

kkitamura
20 Feb 2012, 7:54 AM
Thanks a lot!
Can the font size of a button-text or combo-box item also be changed by CSS?
I tried them but could not change,but only background color.

What is bad?

Code is
-------------------------------
{
xtype:'button',
cls:'x-btn-inner',
.
.
}

{
xtype:'combobox',
cls :'x-combo-list-item',
.
.
}

css is

.x-btn-inner {
background:lightgray;
font-size: 18px !important;
font-weight: bold !important;
color: red;
}


.my-combo-lst .x-combo-list-item{
font-size:48px;
color:red;
}


Best regards,
K.kitamura.

aconran
20 Feb 2012, 8:13 AM
Yes, they can be changed with CSS. Ensure that the rules are affecting the proper elements and have the right amount of specificity.

kkitamura
20 Feb 2012, 8:50 PM
Thanks.:)