I'm struggling with a seemingly simple task here. I've been experimenting with different methods, but I just can't seem to grasp it.
On the front page of my website, there is a cover section that contains a logo and a button:
<section id="cover">
<div id="cover-caption" class="animated fadeInDown">
<p style="padding-bottom: 2rem;"><img src="http://bizcentralusa.com/wp-content/uploads/2016/05/placeholder-sample-logo.png" alt="Sample Logo" /></p>
<p class="lead">
<a class="btn btn-primary btn-lg" data-scroll href="#getStarted" role="button">GET STARTED <i class="fa fa-angle-right animated wobble infinite" aria-hidden="true"></i>
</a>
</p>
</div>
</section>
The cover page background features an image of a laptop covering half of the page. My goal is to position the logo and button between the top of the page and the start of the laptop screen.
This is what I have attempted so far, you can see the visual representation through this Demo.
Usually, I would adjust the padding on the #cover-caption container to achieve the desired position. However, this method doesn't work consistently across different screen resolutions. While it appeared fine on my PC, the positioning was off when I tested it on my Macbook due to variations in browser height. I am looking for a way to automatically adjust the position of the logo and button based on changes in the background image when the browser window's height is altered. Is this even possible?
You can access my complete code here.