How to change width and height of Modalbox jquery popup

Here is an example of using custom height and width with Modalbox jQuery popup. Height and Width options do not work on the image. Modalbox calculates the ideal height of the image and uses appropriate dimensions for display.

Here are few examples:


<ul class="unstyled">
    <li><a id="inline" href="#questionmodal">Inline example of Modalbox</a></li>
    <li><a id="iframe" href="//;ie=UTF8&amp;ll=48.85796,2.295231&amp;spn=0.0042,0.009645&amp;z=17&amp;output=embed">
        iFrame example of Modalbox</a></li>
<div id="questionmodal" class="hide">
    <div class="modal-header">
        <button type="button" class="close inlineclose">
            Simple Question</h3>
    <div class="modal-body">
        <div class="rstquestion">
                Which is the best Operating System in the world?</p>
                <li>Windows XP</li>
                <li data-anwser="correct">Windows 7</li>
                <li>Windows 8</li>
                <li>Max OS</li>
    <div class="modal-footer">
        <a href="#" class="btn inlineclose">Close</a>
<link href="modal.css" rel="Stylesheet" />
<link href="modal-darktheme.css" id="modaltheme"
    rel="Stylesheet" />
<script src="modal.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
            Type: 'inline',
            Width: 550,
            Height: 420, ShowClose : false
            Type: 'iframe',
            Width: 700,
            Height: 600
License & Download ModalBox
Subscribe for our monthly newsletter for updated articles and useful code scripts.

Share It

comments powered by Disqus