Results 1 to 3 of 3

Thread: Set the font size of a button

  1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    172
    Answers
    7

    Default Set the font size of a button

    I'm trying to set the font size of a button like this:
    Code:
    items: [
        {
            xtype: 'button',
            id: 'loadDataBtn',
            text: 'Load Module Data',
            style: {
                "font-size": '30px'
            }
        }
    ]
    I don't want to use a css file at this point, I just want to set the font size as I define the item.
    Why does the above not work? Seems like this should be simple.

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791
    Answers
    585

    Default

    You're setting the font-size on the outer div. The CSS that determines the size of the button text is on the span immediately surrounding the text.

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    Please do not double post:
    http://www.sencha.com/forum/showthread.php?230206

    Scott.

Posting Permissions

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