My div height is 100%, but when I do this I don't know how I can vertically center a P-tag in the center.
How do I do this?
HTML:
<div>
<p>This text has to be vertically centered.</div>
</div>
CSS:
html, body {
height: 100%;
width: 100%;
}
div {
height: 100%;
width: 100%;
background: url(http://www.windsim.com/images/sky/sky_107.bmp) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
p {
font-family: "Times New Roman", Times, serif;
color: black;
text-align: center;
font-size: 65px;
}