voyent
style not being applied to mobi:components  XML
Forum Index -> ICEmobile General
Author Message
Sushma.Paladugu

Joined: 08/Feb/2012 14:08:39
Messages: 7
Offline


Hello All,

I have a mobi:inputText component and I need it to be displayed at a certain width. Applying the styles inline or externally doesn't seem to have no effect on the component appearace. Is there something I am doing wrong here?

This is my input component.


<mobi:inputText id="name"
style="width:100%;" autoCorrect="on"
partialSubmit="true" size="50" type="text"
placeholder="Asset Name input"
value="${bean.name}">
</mobi:inputText>

Thanks,
Sushma
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Hi,
Have you verified that the inline style of 'width: 100%' is being rendered? I'm sure it is, but it might just be taking 100% width of a parent component that's narrower than 100%.

Philip

.
Sushma.Paladugu

Joined: 08/Feb/2012 14:08:39
Messages: 7
Offline


Hi Philip,

I did.

I inspected the element in chrome dev tools and I don't see this style in the first place.
But changing the width from 58% to 100% in the following CSS of the component in the dev tools seem to work.

.ui-field-contain input.ui-input-text, .ui-field-contain textarea.ui-input-text, .ui-field-contain .ui-input-search, .ui-field-contain div.ui-input-text {
width: 58%; // changed it to 100%.
display: inline-block;
}

Also, this is what I see in the dev tools when I inspect the mobi:inputText element -

Code:
 <input autocapitalize="off" autocorrect="off" class="mobi-input-text ui-input-text " id="j_idt26:name" name="j_idt26:name" placeholder="Asset Name input" size="5" style="" type="text" value="phone">
 


Thanks,
Sushma
P.S:I also changed the width to 350px instead of 100% to see if it might be taking 100% width of the parent component. And the above is what I see.


Sushma.Paladugu

Joined: 08/Feb/2012 14:08:39
Messages: 7
Offline


Hello Philip,

Can you tell me why the styles specified as part of the component style element are not being considered?

Thanks,
Sushma
 
Forum Index -> ICEmobile General
Go to:   
Powered by JForum 2.1.7ice © JForum Team