1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    1
    Vote Rating
    0
    binomio is on a distinguished road

      0  

    Default Unanswered: CSS style PC/Smartphone

    Unanswered: CSS style PC/Smartphone


    On PC: the right style with my own CSS

    On Smartphone: the default sencha design. it ignors my own css styles. why? how can i fix it?

    btw: the handler doesen't work too.


    Code:
    xtype: 'button',
                        name : 'umrechnen',
                                        
                        width:'60px',
                        icon: 'img/refresh2.png',
                        iconCls:'btn_umrechnen_icon',
                        cls:'btn_umrechnen',
                        handler:tapHandler
    Code:
    var tapHandler = function (button,event) {
                        
    alert("bam!")            
                }
    Code:
    .btn_umrechnen_icon{
        width:60px !important;
        height:60px !important;
    }
    .btn_umrechnen{
        background-color:#80BA24 !important;
        padding:0 !important;
    }
    
    .x-button-pressed{
        background-color:#71A220 !important;
    }

  2. #2
    Sencha - Services Team AndreaCammarata's Avatar
    Join Date
    Jun 2009
    Posts
    1,395
    Vote Rating
    23
    Answers
    148
    AndreaCammarata has a spectacular aura about AndreaCammarata has a spectacular aura about

      0  

    Default


    Hi.
    In your button definition, you don't have to set a string but just a number

    Code:
    ...
    width: 60
    ...
    The handler doesn't work because its probably out of scope.
    You should provide more info about your code to help us to understand what you are doing wrong.

    However, to customize your application theme I suggest you to do that using SASS.
    There are several post / articles / videos that explain how to do that in the best way.

    Hope this helps.
    Sencha Inc
    Andrea Cammarata, Solutions Engineer
    Owner at SIMACS

    @AndreaCammarata
    www.andreacammarata.com
    github: https://github.com/AndreaCammarata

    TUX components bundle for Sencha Touch 2.x.x
    https://github.com/AndreaCammarata/TUX


Thread Participants: 1