Jan 31, 2013, 8:38 AM
[CLOSED] Element got style="width:0px;" default
Hi,
My situation is pretty strange default style attribute with value width:0px; is loaded even though I doesn't do anything like this for my own.
It's for sure problem with my app because I've tryed wrote simplest sample and this behaviour doesn't occure ;/
In this case I've tryed wrote some other way to make it right(ExtJs script in my guess)
I've wrote this script which should replace old value 0px with new one 60% ( required of scalability).
What am I doing wrong?
Thanks,
ViDom
My situation is pretty strange default style attribute with value width:0px; is loaded even though I doesn't do anything like this for my own.
It's for sure problem with my app because I've tryed wrote simplest sample and this behaviour doesn't occure ;/
In this case I've tryed wrote some other way to make it right(ExtJs script in my guess)
I've wrote this script which should replace old value 0px with new one 60% ( required of scalability).
<script type="text/javascript">
Ext.onReady(function () {
var items = Ext.select('div.x-form-element');
var items2 =Ext.select('div.x-form-element:first-child');
for (var item in items) {
item.setStyle('width', '60%');
}
for(var item2 in items2)
{
item2.setStyle('width', '60%');
}
});
</script>
but in firebug console I've got error says TypeError: item.setStyle is not a function
even when in ExtJs 3.4 documentation it's exists.What am I doing wrong?
Thanks,
ViDom
Last edited by Daniil; Feb 07, 2013 at 3:43 AM.
Reason: [CLOSED]