locked
Modifying the width and height of a <button> RRS feed

  • Question

  • I tried modifying the width and height CSS properties of the button, but it's dimensions never changed. How do I change the size of a button element?
    Wednesday, November 14, 2012 3:20 AM

Answers

  • Hi,

    First, you may define a button as follow:

    <input type="button" style="width:500px;height:500px" />

    Second, you could change that with javascript as follow:

    document.getElementById("btn1").style.width = "400px";


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com
    Microsoft One Code Framework

    Wednesday, November 14, 2012 3:26 AM