I have a linear-gradient background image, and it ends before the content does, height-wise.
I have tried quite a few things to fix this without luck, such as min-height: 100%
and various positioning of the html
and about-body
divs. How do I make the html height fit all the content ?
html {
width: 100%;
min-height: 100%;
overflow-x: hidden;
overflow-y: scroll hidden;
background-image: linear-gradient(#d580ff, #ffcc99);
}
/* Nav bar */
#pageNavBar {
position: relative;
margin: 0 0 0 0;
width: 100%;
}
#header-text {
position: absolute;
width: 100%;
top: 28vw;
text-align: center;
font-family: Gabriola, Arial, sans serif;
font-size: 10vw;
color: white;
transition: all 0.3s ease-in-out;
}
#header-text:hover {
color: rgba(255,255,255,0.8);
text-shadow: 0 0 10px #FFFFFF;
}
#nav-links {
position: absolute;
width: 90%;
height: 3.5vw;
left: 5%;
top: 2vw;
font-family: Gabriola, Arial, sans serif;
font-size: 2vw;
color: black;
text-align: center;
font-weight: bold;
}
.nav-link {
text-decoration: none;
font-family: Gabriola, Arial, sans serif;
font-size: 2vw;
color: black;
margin: 0 5% 0 5%;
transition: all 0.3s ease-in-out;
}
.nav-link:hover {
color: white;
text-shadow: 0 0 10px white;
}
/* About */
#about-body {
clear: both;
position: relative;
top: 8vw;
width: 70%;
margin: 0 15% 0 15%;
border: 0.3vw solid rgba(255,255,255,0.6);
border-radius: 5px;
-webkit-box-shadow:
inset 0 0 8px rgba(0,0,0,0.1),
0 0 16px rgba(0,0,0,0.1);
-moz-box-shadow:
inset 0 0 8px rgba(0,0,0,0.1),
0 0 16px rgba(0,0,0,0.1);
box-shadow:
inset 0 0 8px rgba(0,0,0,0.1),
0 0 16px rgba(0,0,0,0.1);
}
#about-body-header {
position: relative;
width: 100%;
top: 1.5vw;
text-align: center;
font-family: Gabriola, Arial, sans serif;
font-size: 5vw;
color: white;
transition: all 0.3s ease-in-out;
}
#about-body-header:hover {
text-shadow: 0 0 10px white;
}
#aboutImg {
position: relative;
width: 80%;
margin: 3% 10% 5% 10%;
border: 0.15vw solid rgba(255,255,255,0.6);
box-shadow: 0vw 0.5vw 0.75vw gray;
}
#aboutTxt {
position: relative;
font-family: Tahoma;
font-size: 1.25vw;
margin: 0 10% 5% 10%;
}
<body>
<!-- Navigation -->
<div id="nav-links">
<a href="/home" class="nav-link">
Home
</a>
<a href="/about" class="nav-link">
About
</a>
<a href="/projects" class="nav-link">
Projects
</a>
<a href="/gallery" class="nav-link">
Gallery
</a>
<a href="/social" class="nav-link">
Social
</a>
<a href="/contact" class="nav-link">
Contact
</a>
</div>
<!-- Main page body below nav bars -->
<div id="about-body">
<div id="about-body-header">About Me</div>
<img src="/images/image.png" id="aboutImg" />
<p id="aboutTxt">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<br /><br />
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
<br /><br />
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
</body>