I have been working on creating a straightforward responsive "about" page, and everything functions perfectly until I adjust the browser to a smaller size.
HTML
<div id="content">
<div id="area-container">
<h1>about</h1>
<div id="textarea">
<p>My name is...[lorem200words]</p>
</div>
</div>
</div>
CSS
body {
margin: 0 auto;
overflow: hidden;
font-family: 'Share Tech Mono', monospace;
}
#content {
width: 100%;
height: 2457px;
background-image: url('../images/wallpaper.jpg');
}
#area-container {
display:inline-block;
margin-top: 50vh;
margin-left: 50vw;
transform: translate(-50%, -60%);
}
@media screen and (max-width:800px) {
body {
overflow-y: scroll;
}
#content {
width: 100%;
height: 100%;
background-image: url('../images/connected.png');
}
}
https://jsfiddle.net/a4uaquyp/3/
The issue I am encountering is that the entire textarea
section appears to jump out of the browser when I introduce the overflow
to the body, preventing me from scrolling up adequately.
Additionally, there seems to be a surplus of space below the content.
I have attempted to utilize media queries in an effort to adjust the position of #content
by using margin-top
and vw
/vh
, but I am unable to come up with an alternative solution.