Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Button with wider image and left align text

  1. #11

    Default

    I tried adding the !importmant to the css class but the standard class still overwrites it.

    Code:
    .xbtnmc {
    
    text-align:left !important; }
    items : [{ xtype : 'button', text : 'Cashier Statistics', cls : 'xbtnmc' //style : 'text-align:left !important' }

  2. #12
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    It's the td.x-btn-mc element which aligns the text, so target that,

  3. #13

    Default

    Thanks Animal for your reply. I guess I don't follow you when you say "target that element."

    If I overwrite that class then all of the buttons will be left justified, which is not what I want obviously.

    Can you give me another hint please?

    Thanks,
    Chris

  4. #14
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892

    Default

    CSS selectors target specific elements.

    http://www.w3.org/TR/CSS2/selector.html

    It's that central TD in a Button which is styles text-align: center. You can check for yourself in Firebug.

    And you can poke it in Firebug to change it live and see the result just to check for yourself that it has an effect.

    So if you write a CSS rule ehich changes that, you can make it align as you like.

    This is basic HTML development.

  5. #15

    Default

    Thanks Animal for that link!

    Here's my css:
    Code:
    div#ext-gen50 td.x-btn-mc {text-align:left !important;}


    Thanks again. Much appreciative.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •