 <p>solution is add an extra class dialogaddSeasons and use rules listed below: </p> <pre><code> $("#dialogaddSeasons").dialog({ resizable: false, modal: true, width: 460, maxWidth:500, dialogClass:"dialogaddSeasons", draggable: false , title:"Add New Season", buttons: { 'Add Season': function() { $("#dialogaddSeasons #addSeasonForm").submit(); }, Cancel: function() { $(this).dialog('close'); } } }); .dialogaddSeasons table { display:inline; } .dialogaddSeasons form { float:left; } .dialogaddSeasons { display:block; float:left; height:150px; outline-color:-moz-use-text-color; outline-style:none; outline-width:0; right:305px; top:-4.2px; width:460px; z-index:1002; } </code></pre>