I have a jQuery dialog defined as follows
<div id="emaildialog" title="Contact Us">
<!-- Html.RenderPartial("ContactUs"); -->
<div>This is a test</div>
</div>
<script type="text/javascript">
(function ($) {
// increase the default animation speed to exaggerate the effect
$.fx.speeds._default = 1000;
$(function() {
$( "#emaildialog" ).dialog({
autoOpen: false,
show: "blind",
hide: "explode",
width: 700,
modal: true,
position: 'center'
});
$( "#viewselected" ).click(function() {
$( "#emaildialog" ).dialog( "open" );
return false;
});
});
})(jQuery);
</script>
When I click on the button that causes the dialog to show up, the dialog is centered in the middle of the screen, but it span the entire height of the we page. Specifically, the title bar itself stretches and the content at the bottom of the dialog seems fine.
Does anyone know what might be causing this and how to fix it?
I noticed one odd thing. If I click on the side of the dialog to resize the dialog, then it redraws itself properly, and upon inspecting the css I noticed that the dialog has it's position changed from relative to absolute, but this is all done inside jQuery UI, so I'm not sure how to fix this in my code.
The css I'm using is linked from google:
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/
1.7.2/themes/start/jquery-ui.css" type="text/css" rel="Stylesheet" />
You can see the site here for the css: http://dev.thinkterrabella.com/