I am facing an issue with my Angular4 app where I have a <md-card-content>
tag on part of my page. Inside this tag, I am trying to display some content within a <p>
tag which has a maximum height of 20cm.
While this setup works fine for short content, it fails to accommodate longer content. Is there a way to dynamically create another <md-card-content>
if the content exceeds 20cm in height? My goal is to replicate the behavior of Microsoft Word, moving to a new page when the current one is full!
Here is a snippet of my HTML code:
<md-card-content>
<div fxLayout="row" fxLayoutAlign="center center" class="mt-1">
<div class="template">
<p class="head">Mail Number: {{mail_number}}</p> <br>
<p class="head">Date: {{created_at| date:'yyyy MMM dd'}}</p>
<p class="inner" id="mail">{{content}}</p>
<p class="sign" *ngIf="!pageFull">Sincerely</p><br>
<p class="sign" *ngIf="!pageFull">{{sender}}</p>
</div>
</div>
</md-card-content>
Below is the relevant CSS code from my stylesheet:
.template{
width: 600px;
height: 1100px;
border-width: 2px;
border-style: solid;
border-color: #e6e6e6;
padding-top: 23mm;
padding-left: 2cm;
padding-right: 2.5cm;
}
p.head{
line-height: 0.5px;
padding-left: 120mm;
font-size: 3;
}
p{
line-height: 25px;
word-spacing: 1px;
}
.inner{
text-align: justify;
padding-top: 21mm;
padding-bottom: 10mm;
white-space: pre-wrap;
max-height: 20cm;
width: 166mm;
word-wrap: break-word;
}
p.sign{
padding-left: 10mm;
line-height: 0.5px;
}