1. #1
    Sencha User LoneWolfPR's Avatar
    Join Date
    Aug 2012
    Posts
    34
    Answers
    1
    Vote Rating
    0
    LoneWolfPR is on a distinguished road

      0  

    Default Unanswered: Align Text in textfield to center is being ignored.

    Unanswered: Align Text in textfield to center is being ignored.


    I have the following code:
    Code:
    {
    xtype: 'textfield',
    id: 'ap',
    name: 'ap',
    style: 'text-align:center;',
    readOnly: true
    }
    For some reason though, the text in the field does not come up as aligned center. It shows up aligned to the left. When I look in chrome at the Generated Style I see it ignoring a couple calls to center in favor of setting the property to 'text-align: start;' This is coming from '-webkit-autouser agent stylesheet'. Why would it use a browser default and not even insert the style I specified? An inspection of the element itself shows that the specified style isn't even inserted inline like it's supposed to be.

  2. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Answers
    124
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi,
    To align the textfield text into the center, you should use the 'inputCls' config of the textfield. Just all this config to your textfield & define the given class in css section. Review the following code:

    Code:
       inputCls: 'x-text-center',
    then, just define the css class like below:
    .x-text-center{text-align:center;}
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi