Trying to achieve a sleek fade-out effect at the end of a text section for a 'read more' indicator.
I've been studying various tutorials, including this, and my current code is as follows:
html
<section>
<p>Lorem ipsum dolor sit amet...elit.</p>
<p>Ut enim ad minim veniam...aliquip.</p>
<div class="fadeout"></div>
</section>
<p>Additional content here</p>
css
.fadeout {
position: relative;
bottom: 4em;
height: 4em;
background: -webkit-linear-gradient(
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 100%
);
}
The issue I'm facing is that even with the transparent div overlapping the text body, there's still a gap of 4em between it and 'Other Stuff.'
Any suggestions?