I've been searching for a way to increase the width of the modal popup in my cshtml, but haven't been able to. I tried the suggestions in this SO question, but none worked.
Here's my code. Doesn't matter what changes I make to the CSS, the popup will always have a width of 300px: https://i.sstatic.net/82F2mgrT.png. Even when I change the div width within the modal_dialog div, it will just show the horizontal scrollbar.
@page
@model Products.Pages.IndexModel
@{
}
<br />
<br />
<div id="productsContainer">
<button class="openProductModal"> <img src="~/images/logo/Product.png" alt="Product Image" width="200" style="padding: 10px">
</button>
</div>
<br />
<div id="modal_dialog" style="width: 1000px; border: 1px solid red;display: none">
<div>
Ready to pick up
</div>
<div>
Item:
</div>
<div>
Stuff
</div>
</div>
<script type="text/javascript">
$("#productsContainer").on("click", ".openProductModal", function() {
$(".ui-dialog-titlebar").hide();
$("#modal_dialog").dialog({
buttons: {
Close: function() {
$(this).dialog('close');
}
},
modal: true
});
});
</script>