I am facing an issue where I have a div positioned on top of another fixed position div, and I am looking for a way to vertically align the first div. Below is the code snippet that I am currently working with:
<div class="overlay">
<div id="dialogInvoice">
content
</div>
</div>
Here is the CSS associated with the code:
.overlay {
height: 100%;
width: 100%;
top: 0;
left: 0;
background-color: rgba(0,0,0,0.5);
position: fixed;
z-index: 10;
}
#dialogInvoice {
width: 390px;
height: 722px;
margin: 0 auto;
padding-top: 28px;
border-radius: 4px;
background: #ffffff;
position: relative;
}
If anyone has any suggestions or solutions to help me achieve vertical alignment within this setup, I would greatly appreciate it. I have already tried using the line-height method, but it seems to only work with plain text.