I am currently working on a single-page website that needs to be responsive, with smooth scrolling using anchors.
The challenge I'm facing is figuring out how to make each div fill the entire screen as intended.
body {
width: 100%;
height: auto;
font-family: Source Sans Pro, Century Gothic;
background: url('images/bg.jpg');
background-size: cover;
background-repeat: no-repeat;
margin: 0;
}
ul {
list-style: none;
}
#intro1 {
font-family:'Press Start 2P', cursive;
font-size: 80px;
display: block;
text-align: center;
margin-bottom: auto;
margin-top: auto;
top: 50%;
height: 100%;
width: 100%;
position: absolute;
}
#intro2 { //This doesn't work. I've also tried to set top with pixels.
top:100%;
height:600px;
width: 100%;
position: absolute;
font-size: 80px;
display: block;
text-align: center;
margin-bottom: auto;
margin-top: auto;
top: 50%;
font-family: Source Sans Pro;
height: 100%;
width: 100%;
}
#products { //This works fine for some reason.
top: 800px;
width: 100%;
position: relative;
background: url('images/circuit.jpg');
font-family: Source Sans Pro;
font-size: 16px;
margin: 0;
text-align: center;
}
Any suggestions on how I can ensure each div fills the whole screen without relying on jQuery plugins?