PDA

View Full Version : why does style return?



Danis Lee
2 Mar 2011, 3:37 PM
Hi~

i have some problem. i tried applying a style to a BoxComponent in CompositeField.

follow my code



fs = new Ext.form.CompositeField({
width: 500,
item: [{
xtype: 'box',
autoEl: {
tag: 'img',
src: '../image/wave.gif'
}
id: 'wave',
style: {
top: '7px'
}
},{
xtype: 'displayfield',
value: 'look'
}]
});
fs.render('wave-div');


So.. my wave image is rendered by absolute position(left attribute '100px', top attribute '0px')
for that reason, i wanna set top attribute to '7px' value. but that code was not applied.
top attribute have returned to initial value(0px). somebody help me!!