Skip to content

No JS required to do this #3

@ohmycode

Description

@ohmycode

this can be done with simple CSS. just add "big-modal" or "fullscreen-modal" class to the html modal container with following styles:

/* fullscreen modal without margin*/

.fullscreen-modal {
top: 0;
left: 0;
margin-left: 0;
width: 100%;
height: 100%;
border: none;
}

.modal.fullscreen-modal.fade.in {
top: 0%;
}

.fullscreen-modal .modal-body {
position: absolute;
top: 50px;
bottom: 50px;
left: 0;
right: 0;
max-height: none;
}

.fullscreen-modal .modal-footer {
position: absolute;
bottom: 0;
left: 0;
right: 0;
}

/* Big modal with visible margin */

.big-modal {
top: 5%;
left: 5%;
margin-left: 0;
width: 90%;
height: 90%;
}

.modal.big-modal.fade.in {
top: 5%;
}

.big-modal .modal-body {
position: absolute;
top: 50px;
bottom: 50px;
left: 0;
right: 0;
max-height: none;
}

.big-modal .modal-footer {
position: absolute;
bottom: 0;
left: 0;
right: 0;
}

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