I have a div in modal below. The problem I am facing is when I click Add Row, it creates another div with a row and extends the top and bottom. After several lines have been added, the div will turn off the screen. See screenshots. Note. The query-row element is an angular directive, so you do not see a template for it (which includes the actual fields and the add row button). But it does not matter in this case.
HTML
<div class="ng-modal ng-cloak" ng-show="true">
<div class="ng-modal-overlay">
<div class="ng-modal-close">
<div class="ng-modal-close-x">CLOSE</div>
</div>
<div class="ng-modal-dialog">
<div class="ng-modal-dialog-content">
<div class="document-content-wrapper">
<div class="document-content">
<div ng-repeat="row in rows">
<query-row rows="rows" remove-row="removeRow(row)" add-row="addRow()"></query-row>
</div>
<div class="row">
<button ng-click="submit()" class="btn btn-primary">Submit</button>
<button ng-click="cancel()" class="btn btn-info">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
CSS
.ng-modal {
position: fixed;
z-index: 9999;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ng-modal-overlay {
position: absolute;
z-index: 9999;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #282828;
opacity: 0.9;
}
.ng-modal-dialog {
z-index: 10000;
position: absolute;
top: 164px;
left: 53%;
width: 800px;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
padding: 10px;
background-color:#FFF;
}
.ng-modal-dialog-content {
overflow: hidden;
height: 100%;
}
.ng-modal-dialog-input {
margin: 0px;
padding: 5px;
font-size: 36px;
width: 100%;
border: none;
background-color: #fff;
outline: 0;
color: #000;
font-weight:700;
}
.ng-modal-close {
position: absolute;
top: 15px;
right: 28px;
}
.ng-modal-close-x {
font-family: Arial, sans-serif;
display: inline-block;
cursor: pointer;
float: right;
font-size: 18px;
color: #fff;
}
.ng-modal-title {
font-weight: bold;
font-size: 200%;
display: block;
margin-bottom: 10px;
padding-bottom: 7px;
border-bottom: solid 1px #999;
}
Plunger example: http://plnkr.co/edit/RFNsrC
.
1
3 , , . , 2