I have two div
s with textual content which is inside the container. When the screen getting smaller I want to add a scrollbar to div. Everything works almost fine but when a scrollbar appears I can’t see the part of the text that is at the top. it is as if hidden. How can I fix this to scroll through the entire text in div
.
HTML:
<div class="container">
<div class="text-block text-block-one">
<div class="text-wrapper">
<h1>TEXT</h1>
<h3>TEXT</h3>
</div>
</div>
</div>
CSS:
.container {
position: relative;
width: 100%;
display: flex;
}
.text-block {
display: flex;
align-items: center;
flex: 1 0 37.645448%;
overflow: auto;
position: relative;
}
.text-wrapper {
margin: 0 10%;
position: absolute;
content: '';
text-align: center;
}