<div style="white-space: nowrap;">
Some text containing spaces which could be wrapped.
</div>
<script type="text/javascript">
$(function(){
$("div").dialog();
});
</script>
When this dialog opens, the size is too narrow to display the unwrapped contents.
How can I ensure the dialog is wide enough without setting an arbitrary width?
If I got that right, adding width:auto
as a dialog option is enough
$("div").dialog({
width:'auto'
});