Probably it's relate to the fact that its position is absolute
, but still how would you center an absolute
positioned div
?
Using top
, instead of margin-top
works, but left
instead of margin-left
won't affect it. Why ?
.title
{
display:block;
position: absolute;
width: 90%;
margin-left: auto;
margin-right: auto;
height: 10%;
top : 80%;
}
<div class="title fontHugeTitle2"><h1> The Best In Town </h1></div>