On smaller devices, title
goes out of the screen. If I reload the page, it looks good for a second then it overflows. Is there something I haven't considered?
I'm trying to make a full screen header with text and a button and this is what I have done so far:
/*body, html {
height: 100%;
}*/
body {
margin: 0px 0px;
}
#full {
background-image:url(https://chrisaam.files.wordpress.com/2015/03/wallpaper-2846361.jpg);
background-size:cover;
position: relative;
height:100vh;
}
.header {
position: absolute;
top: 50%;
text-align: center;
width: 100%;
color: #fff;
font-size: 36px;
-ms-transform: translate(0,-50%); /* IE 9 */
-webkit-transform: translate(0,-50%); /* Safari */
transform: translate(0,-50%);
}
<div id="full">
<div class="header">
<h1 class="title">ACCENTOMETER</h1>
<button class="btn btn-default header-scroll">PLAY NOW</button>
</div>
</div>