Skip to content

Question: modal height when using more than one div and JS #201

@duenni

Description

@duenni

Hi there,

thanks for this nice project!
I'm using css-modals together with canvasjs and with more than one div. Code looks like this:

    <section class="modal--show" id="modal-text" tabindex="-1" role="dialog" aria-labelledby="modal-label" aria-hidden="true">
        <div class="modal-inner">
            <header id="modal-label"><!-- Header -->My label</header>
            <div class="modal-content"><!-- The modals content -->
                <div id="chartContainer" style="height: 300px; width: 100%;"></div>
                <div id="stats"></div>
            </div>
        </div>
        <a href="#!" class="modal-close" title="Close this modal" data-close="Close" data-dismiss="modal">?</a>
    </section>

The <div>'s get their data from some JavaScript functions. Everything is fine except the height of the modal. It has scrollbars and won't adapt to the height of the generated content. How can I get the modal to fit to the content?
Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions