Q:

How can I dock the button to jQueryUI dialog bottom as the dialog inner content increases?

UPDATE: Sorry I make this question to complex.  
What I want to ask is that how can I "fix" the buttons' position to the bottom of the jQueryUI dialog as the dialog height grow's larger.

I have a jQueryUI dialog as follow:
<head>
$(function(){
    $("#ChooseStoryCategory").dialog({
        autoOpen: false,
        title: "Upload",
        height: 600,
        width: 500,
        modal: true
    }); 
});
</head>

And I add two buttons in the dialog and I always want to put them at the bottom of the dialog. Here is the code:
<body>
<div id= "ChooseStoryCategory">
    <div id="storyCategory"></div>      

    <div><button id="ChooseCategory"><img src= "../pic/chooseOk.png"/></button></div>
    <div><button id="CategoryCancel"><img src= "../pic/close.png"/></button></div>
</div>
</body>

css setting:
#ChooseCategory{
    position: absolute;
    left: 30%;
    top: 85%;
    bottom: 0;

}

#CategoryCancel{
    position: absolute;
    left: 70%;
    top: 85%;
    bottom: 0;
}

But I will always increase element inside the dialog like this:
for(multiple times)://pseudocode
var categoryName= "PressNum1";
var value= 3;
var $btn= $('<button/>').text(categoryName).width(400).height(80);
$btn.bind('click', function(){console.log(value)});
$("#storyCategory").append($btn);

As the added buttons increase, their position will exceed the two buttons(ChooseCategory and CategoryCancel). How can I dock the two buttons to the bottom of the jQueryUI dialog?
I have tried to get the initial top position of the two buttons. As each button is added to the dialog, I just change the position of the two buttons.
$("#CategoryCancel").css("height") = $("#ChooseStoryCategory").css("height") * 0.85 + $btn.css("height");

But  
$("#ChooseStoryCategory").css("height") * 0.85 + $btn.css("height");

didn't add the px, it just combines the number and string...

Is there any simple alternative approach to dock the two buttons at the bottom of the jqueryUI dialog?

A:

Why dont you use the buttons option?
$( "#ChooseStoryCategory" ).dialog({
  autoOpen: false,
  title: "Upload",
  height: 600,
  width: 500,
  modal: true
  buttons: {
    "Choose category": function() {
      // Do something
      $( this ).dialog( "close" );
    },
    Cancel: function() {
      $( this ).dialog( "close" );
    }
  }
});

Check out the examples within jquery-ui's page: http://jqueryui.com/dialog/ or check out the API documentation: http://api.jqueryui.com/dialog/#option-buttons
Here's the jsFeedle: http://jsfiddle.net/6gb4v/ (Took @rusln fiddle and started from there).

