PDA

View Full Version : how to change the form fields height from 30 px to 20 px



adms
19 Sep 2010, 1:15 AM
hi,how can i override the standard form fields height to be 20px ?

laurentParis
19 Sep 2010, 7:14 AM
make css


.ext-strict .x-form-text {height: 20px;}

devtig
19 Sep 2010, 12:14 PM
And you also want to adjust the combobox and date trigger buttons using:

.x-form-field-wrap .x-form-trigger {height:19px;}
I believe you have to use minus 1 to make same height as field.

adms
20 Sep 2010, 12:39 AM
this is my code
but the height is still greater than 20 px why? :s


<style>
.ext-strict .x-form-text {
height: 20px;
}
.x-form-field-wrap .x-form-trigger {
height:19px;
}
</style>
<script>
var panel = new Ext.Panel({
title: 'title'
,renderTo:'mydiv'
, layout:'form'
,items : [{
xtype:'textfield'
,fieldLabel:'lab'
}]
});

</script>

devtig
20 Sep 2010, 12:44 AM
Inspect the elements using firebug and find out yourself which classes you need to style. It think it's this:

.x-form-field {height:20px;}
.x-form-field-wrap .x-form-trigger {height:19px;}

adms
20 Sep 2010, 6:23 AM
thanks, it works now :)