I have created a main login div that is always displayed in the middle of the screen. However, I also have two additional divs - one that is supposed to show above the login div and the other below it.
While the login div displays perfectly in the middle of the screen, the two divs above and below it are not positioned correctly. Can anyone help me figure out how to fix this issue?
HERE IS MY CODE:
.myLogindiv {
position: fixed;
top: 50%;
left: 50%;
margin-top: -50px;
margin-left: -100px;
}
.myAbovediv {
position: fixed;
top: 50%;
left: 50%;
margin-top: -50px;
margin-left: -100px;
}
.myBelowdiv {
position: fixed;
top: 50%;
left: 50%;
margin-top: -50px;
margin-left: -100px;
}
<div class="myAbovediv">Above Div Test</div>
<div class="myLogindiv">Login Div Test</div>
<div class="myBelowdiv">Below Div Test</div>